Skip to content

Instantly share code, notes, and snippets.

@nuxodin
Created December 18, 2012 00:46
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 nuxodin/4323891 to your computer and use it in GitHub Desktop.
Save nuxodin/4323891 to your computer and use it in GitHub Desktop.
node.js "global" and browser "window"
(function (global) {
/* ... Code that defines MyModule ... */
global.MyModule = (global.module || {}).exports = MyModule;
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment