Created
July 30, 2013 08:15
-
-
Save dmikis/6111191 to your computer and use it in GitHub Desktop.
AMD && CommonJS && Plain
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 () { | |
function factory(dep1, dep2) { | |
/* simple modile */ | |
return function () { return dep1 + dep2; }; | |
} | |
if (typeof define === 'function' && define.amd) { | |
define('simple', ['dep1', 'dep2'], factory); | |
} else if (typeof module !== 'undefined' && module.exports) { | |
module.exports = factory(requrie('dep1'), require('dep2')); | |
} else { | |
this.simple = factory(dep1, dep2); | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment