I have a simple codes like the following and execute it as a node module:
console.log(this); module.exports = {…};
I know that global
global
this (in the context of a module) is the same as exports in node.js. However you should generally use exports/module.exports instead, so that it's explicitly clear what you're modifying.
this
exports
module.exports