module.require()

module.require(id)

The module.require method provides a way to load a module as if require() was called from the original module.

Note that in order to do this, you must get a reference to the module object. Since require() returns the module.exports, and the module is typically only available within a specific module's code, it must be explicitly exported in order to be used.

doc_Nodejs
2016-04-30 04:40:26
Comments
Leave a Comment

Please login to continue.