Skip to content

Instantly share code, notes, and snippets.

@djwglpuppy
Created December 3, 2013 17:53
Show Gist options
  • Select an option

  • Save djwglpuppy/7774068 to your computer and use it in GitHub Desktop.

Select an option

Save djwglpuppy/7774068 to your computer and use it in GitHub Desktop.
for various export type for JS
// AMD / RequireJS
if (typeof define !== 'undefined' && define.amd) {
define([], function () {
return async;
});
}
// Node.js
else if (typeof module !== 'undefined' && module.exports) {
module.exports = async;
}
// included directly via <script> tag
else {
root.async = async;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment