Created
July 30, 2014 15:36
-
-
Save garystorey/6a57f5944b796b5c92ee to your computer and use it in GitHub Desktop.
UMD for javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['b'], factory); | |
| } else if (typeof exports === 'object') { | |
| module.exports = factory; | |
| } else { | |
| root.amdWeb = factory(root.b); | |
| } | |
| }(this, function (b) { | |
| //your code here | |
| return {}; | |
| })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment