Plato on Github
Report Home
dojo/testsDOH/resources/nodeamd.js
Maintainability
69.07
Lines of code
22
Difficulty
14.00
Estimated Errors
0.10
Function weight
By Complexity
By SLOC
/* * 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);