Created
February 6, 2012 20:19
-
-
Save anonymous/1754568 to your computer and use it in GitHub Desktop.
Override node's built-in module names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var orig = require('module').prototype.require; | |
require('module').prototype.require = function(path) { | |
return orig.call(this, ~["fs"].indexOf(path) ? path + '-base' : path); | |
}; | |
require('fs'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment