Skip to content

Instantly share code, notes, and snippets.

@begriffs
Created May 31, 2013 13:03
Show Gist options
  • Select an option

  • Save begriffs/5684842 to your computer and use it in GitHub Desktop.

Select an option

Save begriffs/5684842 to your computer and use it in GitHub Desktop.
A CommonJS module which is AMD compatible
if (typeof define !== 'function') {
/* jshint latedef:false */
var define = require('amdefine')(module);
}
define(function () {
function MyModule() {
// ...
}
MyModule.prototype.foo = function () {
// ...
}
return MyModule;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment