add support for CommonJS implementations that do not support modules.exports.

This commit is contained in:
Tony Lukasavage
2011-10-18 11:50:46 -03:00
parent 89cf32f37a
commit 0513f60b63

View File

@@ -54,6 +54,8 @@
if (typeof module !== 'undefined' && module.exports) {
module.exports = _;
_._ = _;
} else if (exports !== 'undefined') {
exports._ = _;
} else {
// Exported as a string, for Closure Compiler "advanced" mode.
root['_'] = _;