The module.exports
object is created by the Module
system. Sometimes this is
not acceptable; many want their module to be an instance of some class. To do
this, assign the desired export object to module.exports
.
The fully resolved filename of the module.
The identifier for the module. Typically this is the fully resolved filename.
true
if the module is running during the Node.js preload
phase.
Whether or not the module is done loading, or is in the process of loading.
The module that first required this one, or null
if the current module is the
entry point of the current process, or undefined
if the module was loaded by
something that is not a CommonJS module (e.g. REPL or import
).
The directory name of the module. This is usually the same as the
path.dirname()
of the module.id
.
The search paths for the module.
The module objects required for the first time by this one.