Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function (name, definition){
- if (typeof define === 'function'){ // AMD
- define(definition);
- } else if (typeof module !== 'undefined' && module.exports) { // Node.js
- module.exports = definition();
- } else { // Browser
- var theModule = definition(), global = this, old = global[name];
- theModule.noConflict = function () {
- global[name] = old;
- return theModule;
- };
- global[name] = theModule;
- }
- })('myModule', function () {
- // return the module's API
- return {};
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement