Skip to content

Instantly share code, notes, and snippets.

@othiym23
Forked from spion/ugly-scope-export.js
Last active December 22, 2015 06:38
Show Gist options
  • Save othiym23/6431910 to your computer and use it in GitHub Desktop.
Save othiym23/6431910 to your computer and use it in GitHub Desktop.
var slice = [].slice;
function exportscope() {
var args = slice.call(arguments);
for (var i = 0; i < args.length; i++) this.exports[args[i]] = eval(args[i]);
}
var a = 1, b = 2, c = 3;
// super-ugly
exportscope.call(module, 'a', 'b', 'c');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment