Skip to content

Instantly share code, notes, and snippets.

@InPermutation
Created February 2, 2013 01:19
Show Gist options
  • Select an option

  • Save InPermutation/4695454 to your computer and use it in GitHub Desktop.

Select an option

Save InPermutation/4695454 to your computer and use it in GitHub Desktop.
Node.js: Import everything from a module into the global scope
var p = require('./program');
for(var dep in p) {
global[dep] = p[dep];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment