-
-
Save mikeerickson/91ddd2283ae624418b845b8ba72028a2 to your computer and use it in GitHub Desktop.
Multiplatform adapter (require, dojo, node.js and vanilla browser)
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
(function(factory) { | |
if (typeof define !== 'undefined' && define.amd) | |
return define(factory); | |
if (typeof module !== 'undefined' && module.exports === exports) | |
return module.exports = factory(); | |
window.LIB_NAME = factory(); | |
})(function() { | |
// Library code here | |
// sample | |
function ok(value) { | |
if (!value) | |
throw new Error('its not ok!'); | |
} | |
return { | |
ok: ok | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment