mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Fixes #335, exporting for Titanium.
This commit is contained in:
@@ -48,13 +48,13 @@
|
|||||||
// 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**, with backwards-compatibility
|
// Export the Underscore object for **Node.js** and **"CommonJS"**, with
|
||||||
// for the old `require()` API. If we're not in CommonJS, add `_` to the
|
// backwards-compatibility for the old `require()` API. If we're not in
|
||||||
// global object.
|
// CommonJS, add `_` to the global object.
|
||||||
if (typeof module !== 'undefined' && module.exports) {
|
if (typeof exports !== 'undefined') {
|
||||||
module.exports = _;
|
if (typeof module !== 'undefined' && module.exports) {
|
||||||
_._ = _;
|
exports = module.exports = _;
|
||||||
} else if (typeof exports !== 'undefined' && exports) {
|
}
|
||||||
exports._ = _;
|
exports._ = _;
|
||||||
} else {
|
} else {
|
||||||
// Exported as a string, for Closure Compiler "advanced" mode.
|
// Exported as a string, for Closure Compiler "advanced" mode.
|
||||||
|
|||||||
Reference in New Issue
Block a user