underscore-source 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
// Underscore.js 1.
|
1
|
+
// Underscore.js 1.3.0
|
2
2
|
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
3
3
|
// Underscore is freely distributable under the MIT license.
|
4
4
|
// Portions of Underscore are inspired or borrowed from Prototype,
|
@@ -48,26 +48,21 @@
|
|
48
48
|
// Create a safe reference to the Underscore object for use below.
|
49
49
|
var _ = function(obj) { return new wrapper(obj); };
|
50
50
|
|
51
|
-
// Export the Underscore object for **Node.js
|
52
|
-
// backwards-compatibility for the old `require()` API. If we're
|
53
|
-
//
|
51
|
+
// Export the Underscore object for **Node.js**, with
|
52
|
+
// backwards-compatibility for the old `require()` API. If we're in
|
53
|
+
// the browser, add `_` as a global object via a string identifier,
|
54
|
+
// for Closure Compiler "advanced" mode.
|
54
55
|
if (typeof exports !== 'undefined') {
|
55
56
|
if (typeof module !== 'undefined' && module.exports) {
|
56
57
|
exports = module.exports = _;
|
57
58
|
}
|
58
59
|
exports._ = _;
|
59
|
-
} else if (typeof define === 'function' && define.amd) {
|
60
|
-
// Register as a named module with AMD.
|
61
|
-
define('underscore', function() {
|
62
|
-
return _;
|
63
|
-
});
|
64
60
|
} else {
|
65
|
-
// Exported as a string, for Closure Compiler "advanced" mode.
|
66
61
|
root['_'] = _;
|
67
62
|
}
|
68
63
|
|
69
64
|
// Current version.
|
70
|
-
_.VERSION = '1.
|
65
|
+
_.VERSION = '1.3.0';
|
71
66
|
|
72
67
|
// Collection Functions
|
73
68
|
// --------------------
|