Node.js top level `this`
In a nodejs script
, the top level this
refers to module.exports
.
This doesn’t seem to be documented anywhere. Verify by executing the following:
[js] console.log(this === module.exports); [/js]
Written on May 17, 2016