Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
module: replace NativeModule.require
Browse files Browse the repository at this point in the history
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: #9201
Ref: #2009
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
Herbert Vojčík authored and trevnorris committed Feb 12, 2015
1 parent 6c60a72 commit b8604fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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');

Expand Down

0 comments on commit b8604fa

Please sign in to comment.