Skip to content

Instantly share code, notes, and snippets.

@lekoder
Last active March 17, 2016 21:26
Show Gist options
  • Save lekoder/5c86efb5a1ef996308c4 to your computer and use it in GitHub Desktop.
Save lekoder/5c86efb5a1ef996308c4 to your computer and use it in GitHub Desktop.
var wires={};
function want(mod) {
return function(name) {
return wires[name] || (mod || require.main).require(name);
}
}
want.wire = function(name, to) {
wires[name] = to;
}
module.exports = want;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment