Skip to content

Instantly share code, notes, and snippets.

@rogerz
Last active December 30, 2015 07:49
Show Gist options
  • Save rogerz/7798586 to your computer and use it in GitHub Desktop.
Save rogerz/7798586 to your computer and use it in GitHub Desktop.
wrap a script for CommonJS and AMD
/* https://github.com/yields/case/blob/master/dist/Case.js */
(function () {
var Case = {};
if (typeof define === 'function' && define.amd) {
define(function(){ return Case; });
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = Case;
} else {
this.Case = Case;
}
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment