diff options
author | Herbert Vojčík <herby@mailbox.sk> | 2015-02-12 14:50:47 +0100 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2015-02-12 14:37:30 -0700 |
commit | b8604fa4807a3c06c5a668c074ef44e78c73986e (patch) | |
tree | d2f44bb7c6589c0cac02cdcc37fb9f4dffdb7913 | |
parent | 6c60a72d2b6e3d2af281621ff109ccf8687b35f6 (diff) | |
download | node-b8604fa4807a3c06c5a668c074ef44e78c73986e.tar.gz |
module: replace NativeModule.require
The NativeModule system passes NativeModule.require transparently and so
is unnecessary to call explicitly.
The only one which should have the prefix is the in line 295, where
actually implements a big fs-based module system and actually requires a
native module. That is left unchanged.
PR-URL: https://github.com/joyent/node/pull/9201
Ref: https://github.com/joyent/node/issues/2009
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
-rw-r--r-- | lib/module.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/module.js b/lib/module.js index da51cf5ec..4ac8cfa30 100644 --- a/lib/module.js +++ b/lib/module.js @@ -20,11 +20,11 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. var NativeModule = require('native_module'); -var util = NativeModule.require('util'); +var util = require('util'); var runInThisContext = require('vm').runInThisContext; var runInNewContext = require('vm').runInNewContext; var assert = require('assert').ok; -var fs = NativeModule.require('fs'); +var fs = require('fs'); // If obj.hasOwnProperty has been overridden, then calling @@ -61,7 +61,7 @@ Module.globalPaths = []; Module.wrapper = NativeModule.wrapper; Module.wrap = NativeModule.wrap; -var path = NativeModule.require('path'); +var path = require('path'); Module._debug = util.debuglog('module'); |