Skip to content

Instantly share code, notes, and snippets.

@ghaiklor
Created February 3, 2017 16:26
Show Gist options
  • Save ghaiklor/5adb6aababd8d2d06758ca4ac923a688 to your computer and use it in GitHub Desktop.
Save ghaiklor/5adb6aababd8d2d06758ca4ac923a688 to your computer and use it in GitHub Desktop.
Module.prototype.require() sources
Module.prototype.require = function(path) {
assert(path, 'missing path');
assert(typeof path === 'string', 'path must be a string');
return Module._load(path, this, /* isMain */ false);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment