Created
July 2, 2012 20:16
-
-
Save iamdustan/3035422 to your computer and use it in GitHub Desktop.
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
((name, context, definition) -> | |
if typeof module isnt "undefined" | |
module.exports = definition(name, context) | |
else if typeof define is "function" and typeof define.amd is "object" | |
define definition | |
else | |
context[name] = definition(name, context) | |
) "moduleName", this, (name, context) -> | |
# module code it up |
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
(function (name, context, definition) { | |
if (typeof module !== 'undefined') module.exports = definition(name, context); | |
else if (typeof define === 'function' && typeof define.amd === 'object') define(definition); | |
else context[name] = definition(name, context); | |
}('moduleName', this, function(name, context) { | |
// ... module code goes here ... | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment