ApplesauceOS
Read Markdown ↗Download .md

module

Inspect the current CommonJS module.

js
module

Arguments

No arguments.

Returns

Object with id, filename, exports, loaded, parent, children and require.

Example

js
console.log(module.filename);

Notes

Properties describe the current module. Assign module.exports to change what require() returns.

All JavaScript APIs · Automation playbook