Skip to content

Instantly share code, notes, and snippets.

@sobstel
Created February 25, 2016 11:23
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 sobstel/01d6ca5a87a07bb4a260 to your computer and use it in GitHub Desktop.
Save sobstel/01d6ca5a87a07bb4a260 to your computer and use it in GitHub Desktop.
AMD loading code
var LibName = (function () {
function LibName() {
// ...
}
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// AMD. Register as an anonymous module.
define(function() {
'use strict';
return LibName;
});
}
return LibName;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment