Created
September 24, 2013 09:14
-
-
Save squallstar/6682281 to your computer and use it in GitHub Desktop.
AMD/CommonJS/Module.exports
This file contains 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
if typeof define is 'function' and define.amd | |
# AMD | |
define -> MyObject | |
else if typeof exports is 'object' | |
# CommonJS | |
module.exports = MyObject | |
else | |
# Global | |
MyObject.init() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment