mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Removing AMD 'support' from Underscore.
This commit is contained in:
@@ -48,21 +48,16 @@
|
|||||||
// Create a safe reference to the Underscore object for use below.
|
// Create a safe reference to the Underscore object for use below.
|
||||||
var _ = function(obj) { return new wrapper(obj); };
|
var _ = function(obj) { return new wrapper(obj); };
|
||||||
|
|
||||||
// Export the Underscore object for **Node.js** and **"CommonJS"**, with
|
// Export the Underscore object for **Node.js**, with
|
||||||
// backwards-compatibility for the old `require()` API. If we're not in
|
// backwards-compatibility for the old `require()` API. If we're in
|
||||||
// CommonJS, add `_` to the global object.
|
// the browser, add `_` as a global object via a string identifier,
|
||||||
|
// for Closure Compiler "advanced" mode.
|
||||||
if (typeof exports !== 'undefined') {
|
if (typeof exports !== 'undefined') {
|
||||||
if (typeof module !== 'undefined' && module.exports) {
|
if (typeof module !== 'undefined' && module.exports) {
|
||||||
exports = module.exports = _;
|
exports = module.exports = _;
|
||||||
}
|
}
|
||||||
exports._ = _;
|
exports._ = _;
|
||||||
} else if (typeof define === 'function' && define.amd) {
|
|
||||||
// Register as a named module with AMD.
|
|
||||||
define('underscore', function() {
|
|
||||||
return _;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// Exported as a string, for Closure Compiler "advanced" mode.
|
|
||||||
root['_'] = _;
|
root['_'] = _;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user