joyent/node — Issue #2009: Cleanup of 'NativeModule.require' calls in lib/module.js
Author: herby
Created: 2011-11-04 10:08:37+00:00
State: open

All calls to `NativeModule.require` called with string literal argument (`'fs'` and `'path'`) are unnecessarily explicitly referring to `NativeModule` and can and should be changed to plain `require` call. This matches with the way how any other native module perform these requires (module.js is in no way special in this).
Only call which should retain the explicit `NativeModule.require` is the one inside `Module._load` which calls with a variable argument `id`, not with a literal argument.