Skip to content

Instantly share code, notes, and snippets.

@jgatjens
Created January 18, 2016 14:03
Show Gist options
  • Save jgatjens/944fbfed400b871c6d4b to your computer and use it in GitHub Desktop.
Save jgatjens/944fbfed400b871c6d4b to your computer and use it in GitHub Desktop.
RequireJS, Node, as a plain script, and CommonJS
if (typeof module != 'undefined' && module.exports) {
module.exports = bbArray;
} else if (typeof define === "function" && define.amd) {
define("bbArray", [], function() {
return bbArray;
});
} else {
global.bbArray = bbArray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment