Skip to content

Instantly share code, notes, and snippets.

@briancavalier
Forked from unscriptable/bp1.js
Created November 9, 2011 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briancavalier/1350227 to your computer and use it in GitHub Desktop.
Save briancavalier/1350227 to your computer and use it in GitHub Desktop.
boilerplate for CommonJS, AMD, plain old global hackfest
(function (namespace, myLib) {
//Set up myLib here.
if (typeof define == 'function' && define.amd) {
define(myLib);
}
else {
namespace.myLib = myLib;
}
})(this, typeof exports == 'object' ? exports : {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment