Skip to content

Instantly share code, notes, and snippets.

@wilsonpage
Created June 17, 2015 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilsonpage/01fd0825ce4404ceb955 to your computer and use it in GitHub Desktop.
Save wilsonpage/01fd0825ce4404ceb955 to your computer and use it in GitHub Desktop.
A module wrapper that supports AMD, CommonJS and Window Globals
!((define)=>{define((require,exports,module)=>{
module.exports = 'stuff';
});})((typeof define)[0]=='f'&&define.amd?define:((n,nn,w)=>{return(typeof
module)[0]=='o'?c=>{c(require,exports,module);}:(c)=>{var m={exports:{}};
c(n=>w[n],m.exports,m);w[n]=m.exports;};})('moduleName',this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment