dojo
Version:
Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.
27 lines (21 loc) • 713 B
JavaScript
/*
* Test module for dojo/node plugin that tries to detect AMD
*/
(function(undefined){
var nodeamd = {};
nodeamd.test = 'foo';
// 'Improper' detection of AMD in a combined CommonJS/AMD modules, where the module thinks it is being loaded
// by an AMD loader, when in fact it could be being loaded by a CommonJS module loader. The dojo/node plugin
// needs to 'hide' define from these types of modules.
if (typeof define === 'function' && define.amd) {
define('nodeamd', [], function () {
return nodeamd;
});
}
else if (typeof module !== 'undefined' && module.exports) {
module.exports = nodeamd;
}
else if (typeof ender === 'undefined') {
this['nodeamd'] = nodeamd;
}
}).call(this);