Merge branch 'master' of github.com:documentcloud/underscore

This commit is contained in:
Jeremy Ashkenas
2011-10-19 15:59:54 -04:00

View File

@@ -56,6 +56,14 @@
exports = module.exports = _;
}
exports._ = _;
} else if (typeof define === 'function' && define.amd) {
// Register as a module with AMD. Use a named module since underscore
// can be used in optimization schemes that do not understand anonymous
// modules, and the if it is used on a page with an AMD loader, a load
// error could occur.
define('underscore', function() {
return _;
});
} else {
// Exported as a string, for Closure Compiler "advanced" mode.
root['_'] = _;