Skip to content

Instantly share code, notes, and snippets.

@wrumsby
Last active December 19, 2015 21:19
Show Gist options
  • Select an option

  • Save wrumsby/6019354 to your computer and use it in GitHub Desktop.

Select an option

Save wrumsby/6019354 to your computer and use it in GitHub Desktop.
Detecing AMD support
(function (global) {
'use strict';
var ristretto = {
// ...
};
if (typeof define === 'function' && define.amd) {
define([], function () {
return ristretto;
});
} else {
global.ristretto = ristretto;
}
}(window));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment