What is the context of functions in files by nodejs? If I need exports function I just write
module.exports = function () {};
or
module.someFunction = function () {};
But what context has function without module?
function someFunction () {};
console.log(module); // not someFunction
console.log(module.exports); // not someFunction
P.S. Where can I see some list of declared functions in this file? In browser I have window
. In nodejs I have global
, module
, module.exports
, but not one of its haven't the declared functions.