Created
October 9, 2018 07:41
-
-
Save copyrighthero/bc248ed25610c7f9ffd849d1e8dac3ea to your computer and use it in GitHub Desktop.
UMD 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
void function (global, factory) { | |
'use strict'; | |
// module identifier | |
var identifier = 'identifier'; | |
// module exportation | |
if (typeof define === 'function' && define.amd) { | |
// AMD module | |
define([], factory); | |
} else if (typeof module === 'object' && module.exports) { | |
// CommonJS-Like module | |
module.exports = factory(); | |
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | |
// CommonJS strict module | |
exports[identifier] = factory(); | |
} else { | |
// Global module | |
global[identifier] = factory(); | |
} | |
} (this, function () { return function () { | |
'use strict'; | |
}}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment