Skip to content

Instantly share code, notes, and snippets.

@AlyxRen
Created July 21, 2010 06:36
Show Gist options
  • Save AlyxRen/484155 to your computer and use it in GitHub Desktop.
Save AlyxRen/484155 to your computer and use it in GitHub Desktop.
"use strict";
/*!
* pass it the string for a require and the object you want to fill with the require;
* ie:
* var import = require('import').imp;
* import('sys', global);
* puts('Test');
*/
exports.imp = function(trgt, obj){
var temp = require(trgt);
for (var i in temp){
obj[i] = temp[i];
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment