mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Export _ object as the entire module
This commit is contained in:
@@ -47,11 +47,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 **CommonJS**.
|
if (typeof module !== 'undefined') {
|
||||||
if (typeof exports !== 'undefined') exports._ = _;
|
// Export the Underscore object for **CommonJS**.
|
||||||
|
module.exports = _;
|
||||||
|
|
||||||
// Export Underscore to the global scope.
|
// Backwards compat with old requiring api
|
||||||
root._ = _;
|
_._ = _;
|
||||||
|
} else {
|
||||||
|
// Export Underscore to the global scope.
|
||||||
|
root._ = _;
|
||||||
|
}
|
||||||
|
|
||||||
// Current version.
|
// Current version.
|
||||||
_.VERSION = '1.1.2';
|
_.VERSION = '1.1.2';
|
||||||
|
|||||||
Reference in New Issue
Block a user