Skip to content

Instantly share code, notes, and snippets.

@bmeck
Created June 16, 2014 19:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmeck/0d0b6ad6b394ebb2a3e4 to your computer and use it in GitHub Desktop.
Save bmeck/0d0b6ad6b394ebb2a3e4 to your computer and use it in GitHub Desktop.
var where_to_act_as = '.';
var Module = require('module').Module;
var mod_dir = require('path').join(where_to_act_as, 'node_modules');
var e = Module._resolveFilename('split', {paths:[mod_dir]});
console.log(require(e));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment