lodash-rails 4.12.0 → 4.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lodash/rails/version.rb +1 -1
- data/vendor/assets/javascripts/lodash.core.js +130 -226
- data/vendor/assets/javascripts/lodash.core.min.js +25 -25
- data/vendor/assets/javascripts/lodash.js +397 -235
- data/vendor/assets/javascripts/lodash.min.js +120 -118
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c98dbe7d6d7c67a7e4453aa7f9568e98d98dc0f
|
4
|
+
data.tar.gz: 23c404406ef9932cd4efe0205080218d9309eac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8899d6a919f6a5d432bc359d9dbfb8002c005237e71b2a71a41e03ef0512f0eb6875f36a449f8101370dc2c054e68930ae4ccb08bdd5a825c9c087efd4c1bde9
|
7
|
+
data.tar.gz: 7c21233323dc44fcfa27c92c2c6ae346bf6613ac17da719fc6383ebdf8fcc8f5302fb3b1e87b1696b56e2a9db24734bdc5e972b3ddcc20d454edb8da3a2f0285
|
data/README.md
CHANGED
data/lib/lodash/rails/version.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash <https://lodash.com/>
|
3
|
+
* lodash (Custom Build) <https://lodash.com/>
|
4
|
+
* Build: `lodash core -o ./dist/lodash.core.js`
|
4
5
|
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
5
6
|
* Released under MIT license <https://lodash.com/license>
|
6
7
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
@@ -12,7 +13,7 @@
|
|
12
13
|
var undefined;
|
13
14
|
|
14
15
|
/** Used as the semantic version number. */
|
15
|
-
var VERSION = '4.
|
16
|
+
var VERSION = '4.13.1';
|
16
17
|
|
17
18
|
/** Used as the `TypeError` message for "Functions" methods. */
|
18
19
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
@@ -46,9 +47,6 @@
|
|
46
47
|
var reUnescapedHtml = /[&<>"'`]/g,
|
47
48
|
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
48
49
|
|
49
|
-
/** Used to detect unsigned integer values. */
|
50
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
51
|
-
|
52
50
|
/** Used to map characters to HTML entities. */
|
53
51
|
var htmlEscapes = {
|
54
52
|
'&': '&',
|
@@ -59,48 +57,23 @@
|
|
59
57
|
'`': '`'
|
60
58
|
};
|
61
59
|
|
62
|
-
/** Used to determine if values are of the language type `Object`. */
|
63
|
-
var objectTypes = {
|
64
|
-
'function': true,
|
65
|
-
'object': true
|
66
|
-
};
|
67
|
-
|
68
60
|
/** Detect free variable `exports`. */
|
69
|
-
var freeExports =
|
70
|
-
? exports
|
71
|
-
: undefined;
|
61
|
+
var freeExports = typeof exports == 'object' && exports;
|
72
62
|
|
73
63
|
/** Detect free variable `module`. */
|
74
|
-
var freeModule =
|
75
|
-
? module
|
76
|
-
: undefined;
|
77
|
-
|
78
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
79
|
-
var moduleExports = (freeModule && freeModule.exports === freeExports)
|
80
|
-
? freeExports
|
81
|
-
: undefined;
|
64
|
+
var freeModule = freeExports && typeof module == 'object' && module;
|
82
65
|
|
83
66
|
/** Detect free variable `global` from Node.js. */
|
84
|
-
var freeGlobal = checkGlobal(
|
67
|
+
var freeGlobal = checkGlobal(typeof global == 'object' && global);
|
85
68
|
|
86
69
|
/** Detect free variable `self`. */
|
87
|
-
var freeSelf = checkGlobal(
|
88
|
-
|
89
|
-
/** Detect free variable `window`. */
|
90
|
-
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
70
|
+
var freeSelf = checkGlobal(typeof self == 'object' && self);
|
91
71
|
|
92
72
|
/** Detect `this` as the global object. */
|
93
|
-
var thisGlobal = checkGlobal(
|
73
|
+
var thisGlobal = checkGlobal(typeof this == 'object' && this);
|
94
74
|
|
95
|
-
/**
|
96
|
-
|
97
|
-
*
|
98
|
-
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
99
|
-
* restricted `window` object, otherwise the `window` object is used.
|
100
|
-
*/
|
101
|
-
var root = freeGlobal ||
|
102
|
-
((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
|
103
|
-
freeSelf || thisGlobal || Function('return this')();
|
75
|
+
/** Used as a reference to the global object. */
|
76
|
+
var root = freeGlobal || freeSelf || thisGlobal || Function('return this')();
|
104
77
|
|
105
78
|
/*--------------------------------------------------------------------------*/
|
106
79
|
|
@@ -118,27 +91,26 @@
|
|
118
91
|
}
|
119
92
|
|
120
93
|
/**
|
121
|
-
* The base implementation of
|
122
|
-
* support for iteratee shorthands
|
123
|
-
* `eachFunc`.
|
94
|
+
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
95
|
+
* support for iteratee shorthands.
|
124
96
|
*
|
125
97
|
* @private
|
126
|
-
* @param {Array
|
98
|
+
* @param {Array} array The array to search.
|
127
99
|
* @param {Function} predicate The function invoked per iteration.
|
128
|
-
* @param {
|
129
|
-
* @param {boolean} [
|
130
|
-
*
|
131
|
-
* @returns {*} Returns the found element or its key, else `undefined`.
|
100
|
+
* @param {number} fromIndex The index to search from.
|
101
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
102
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
132
103
|
*/
|
133
|
-
function
|
134
|
-
var
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
104
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
105
|
+
var length = array.length,
|
106
|
+
index = fromIndex + (fromRight ? 1 : -1);
|
107
|
+
|
108
|
+
while ((fromRight ? index-- : ++index < length)) {
|
109
|
+
if (predicate(array[index], index, array)) {
|
110
|
+
return index;
|
139
111
|
}
|
140
|
-
}
|
141
|
-
return
|
112
|
+
}
|
113
|
+
return -1;
|
142
114
|
}
|
143
115
|
|
144
116
|
/**
|
@@ -163,25 +135,6 @@
|
|
163
135
|
return accumulator;
|
164
136
|
}
|
165
137
|
|
166
|
-
/**
|
167
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
168
|
-
* or max array length checks.
|
169
|
-
*
|
170
|
-
* @private
|
171
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
172
|
-
* @param {Function} iteratee The function invoked per iteration.
|
173
|
-
* @returns {Array} Returns the array of results.
|
174
|
-
*/
|
175
|
-
function baseTimes(n, iteratee) {
|
176
|
-
var index = -1,
|
177
|
-
result = Array(n);
|
178
|
-
|
179
|
-
while (++index < n) {
|
180
|
-
result[index] = iteratee(index);
|
181
|
-
}
|
182
|
-
return result;
|
183
|
-
}
|
184
|
-
|
185
138
|
/**
|
186
139
|
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
187
140
|
* array of `object` property values corresponding to the property names
|
@@ -227,33 +180,8 @@
|
|
227
180
|
* @param {*} value The value to check.
|
228
181
|
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
229
182
|
*/
|
230
|
-
function isHostObject(
|
231
|
-
|
232
|
-
// despite having improperly defined `toString` methods.
|
233
|
-
var result = false;
|
234
|
-
if (value != null && typeof value.toString != 'function') {
|
235
|
-
try {
|
236
|
-
result = !!(value + '');
|
237
|
-
} catch (e) {}
|
238
|
-
}
|
239
|
-
return result;
|
240
|
-
}
|
241
|
-
|
242
|
-
/**
|
243
|
-
* Converts `iterator` to an array.
|
244
|
-
*
|
245
|
-
* @private
|
246
|
-
* @param {Object} iterator The iterator to convert.
|
247
|
-
* @returns {Array} Returns the converted array.
|
248
|
-
*/
|
249
|
-
function iteratorToArray(iterator) {
|
250
|
-
var data,
|
251
|
-
result = [];
|
252
|
-
|
253
|
-
while (!(data = iterator.next()).done) {
|
254
|
-
result.push(data.value);
|
255
|
-
}
|
256
|
-
return result;
|
183
|
+
function isHostObject() {
|
184
|
+
return false;
|
257
185
|
}
|
258
186
|
|
259
187
|
/*--------------------------------------------------------------------------*/
|
@@ -279,11 +207,7 @@
|
|
279
207
|
var oldDash = root._;
|
280
208
|
|
281
209
|
/** Built-in value references. */
|
282
|
-
var
|
283
|
-
Symbol = root.Symbol,
|
284
|
-
Uint8Array = root.Uint8Array,
|
285
|
-
enumerate = Reflect ? Reflect.enumerate : undefined,
|
286
|
-
objectCreate = Object.create,
|
210
|
+
var objectCreate = Object.create,
|
287
211
|
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
288
212
|
|
289
213
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
@@ -368,19 +292,21 @@
|
|
368
292
|
* `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
|
369
293
|
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
|
370
294
|
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
|
371
|
-
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
|
372
|
-
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
|
373
|
-
* `isSet`, `isString`, `isUndefined`, `isTypedArray`,
|
374
|
-
* `
|
375
|
-
* `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
|
376
|
-
* `
|
377
|
-
* `
|
378
|
-
* `
|
379
|
-
* `
|
380
|
-
* `
|
381
|
-
* `
|
382
|
-
* `
|
383
|
-
* `
|
295
|
+
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
|
296
|
+
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
|
297
|
+
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
|
298
|
+
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
|
299
|
+
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
|
300
|
+
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
|
301
|
+
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
|
302
|
+
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
|
303
|
+
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
|
304
|
+
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
|
305
|
+
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
|
306
|
+
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
|
307
|
+
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
|
308
|
+
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
|
309
|
+
* `upperFirst`, `value`, and `words`
|
384
310
|
*
|
385
311
|
* @name _
|
386
312
|
* @constructor
|
@@ -726,7 +652,7 @@
|
|
726
652
|
}
|
727
653
|
stack.push([object, other]);
|
728
654
|
if (isSameTag && !objIsObj) {
|
729
|
-
var result = (objIsArr
|
655
|
+
var result = (objIsArr)
|
730
656
|
? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
|
731
657
|
: equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
|
732
658
|
stack.pop();
|
@@ -800,13 +726,6 @@
|
|
800
726
|
return result;
|
801
727
|
}
|
802
728
|
|
803
|
-
// Fallback for IE < 9 with es6-shim.
|
804
|
-
if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
|
805
|
-
baseKeysIn = function(object) {
|
806
|
-
return iteratorToArray(enumerate(object));
|
807
|
-
};
|
808
|
-
}
|
809
|
-
|
810
729
|
/**
|
811
730
|
* The base implementation of `_.lt` which doesn't coerce arguments to numbers.
|
812
731
|
*
|
@@ -1145,6 +1064,31 @@
|
|
1145
1064
|
};
|
1146
1065
|
}
|
1147
1066
|
|
1067
|
+
/**
|
1068
|
+
* Creates a `_.find` or `_.findLast` function.
|
1069
|
+
*
|
1070
|
+
* @private
|
1071
|
+
* @param {Function} findIndexFunc The function to find the collection index.
|
1072
|
+
* @returns {Function} Returns the new find function.
|
1073
|
+
*/
|
1074
|
+
function createFind(findIndexFunc) {
|
1075
|
+
return function(collection, predicate, fromIndex) {
|
1076
|
+
var iterable = Object(collection);
|
1077
|
+
predicate = baseIteratee(predicate, 3);
|
1078
|
+
if (!isArrayLike(collection)) {
|
1079
|
+
var props = keys(collection);
|
1080
|
+
}
|
1081
|
+
var index = findIndexFunc(props || collection, function(value, key) {
|
1082
|
+
if (props) {
|
1083
|
+
key = value;
|
1084
|
+
value = iterable[key];
|
1085
|
+
}
|
1086
|
+
return predicate(value, key, iterable);
|
1087
|
+
}, fromIndex);
|
1088
|
+
return index > -1 ? collection[props ? props[index] : index] : undefined;
|
1089
|
+
};
|
1090
|
+
}
|
1091
|
+
|
1148
1092
|
/**
|
1149
1093
|
* Creates a function that wraps `func` to invoke it with the `this` binding
|
1150
1094
|
* of `thisArg` and `partials` prepended to the arguments it receives.
|
@@ -1369,23 +1313,6 @@
|
|
1369
1313
|
*/
|
1370
1314
|
var getLength = baseProperty('length');
|
1371
1315
|
|
1372
|
-
/**
|
1373
|
-
* Creates an array of index keys for `object` values of arrays,
|
1374
|
-
* `arguments` objects, and strings, otherwise `null` is returned.
|
1375
|
-
*
|
1376
|
-
* @private
|
1377
|
-
* @param {Object} object The object to query.
|
1378
|
-
* @returns {Array|null} Returns index keys, else `null`.
|
1379
|
-
*/
|
1380
|
-
function indexKeys(object) {
|
1381
|
-
var length = object ? object.length : undefined;
|
1382
|
-
if (isLength(length) &&
|
1383
|
-
(isArray(object) || isString(object) || isArguments(object))) {
|
1384
|
-
return baseTimes(length, String);
|
1385
|
-
}
|
1386
|
-
return null;
|
1387
|
-
}
|
1388
|
-
|
1389
1316
|
/**
|
1390
1317
|
* Checks if `value` is a flattenable `arguments` object or array.
|
1391
1318
|
*
|
@@ -1397,35 +1324,6 @@
|
|
1397
1324
|
return isArray(value) || isArguments(value);
|
1398
1325
|
}
|
1399
1326
|
|
1400
|
-
/**
|
1401
|
-
* Checks if `value` is a valid array-like index.
|
1402
|
-
*
|
1403
|
-
* @private
|
1404
|
-
* @param {*} value The value to check.
|
1405
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
1406
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
1407
|
-
*/
|
1408
|
-
function isIndex(value, length) {
|
1409
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
1410
|
-
return !!length &&
|
1411
|
-
(typeof value == 'number' || reIsUint.test(value)) &&
|
1412
|
-
(value > -1 && value % 1 == 0 && value < length);
|
1413
|
-
}
|
1414
|
-
|
1415
|
-
/**
|
1416
|
-
* Checks if `value` is likely a prototype object.
|
1417
|
-
*
|
1418
|
-
* @private
|
1419
|
-
* @param {*} value The value to check.
|
1420
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
1421
|
-
*/
|
1422
|
-
function isPrototype(value) {
|
1423
|
-
var Ctor = value && value.constructor,
|
1424
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
1425
|
-
|
1426
|
-
return value === proto;
|
1427
|
-
}
|
1428
|
-
|
1429
1327
|
/**
|
1430
1328
|
* Converts `value` to a string key if it's not a string or symbol.
|
1431
1329
|
*
|
@@ -1492,6 +1390,54 @@
|
|
1492
1390
|
: [];
|
1493
1391
|
}
|
1494
1392
|
|
1393
|
+
/**
|
1394
|
+
* This method is like `_.find` except that it returns the index of the first
|
1395
|
+
* element `predicate` returns truthy for instead of the element itself.
|
1396
|
+
*
|
1397
|
+
* @static
|
1398
|
+
* @memberOf _
|
1399
|
+
* @since 1.1.0
|
1400
|
+
* @category Array
|
1401
|
+
* @param {Array} array The array to search.
|
1402
|
+
* @param {Array|Function|Object|string} [predicate=_.identity]
|
1403
|
+
* The function invoked per iteration.
|
1404
|
+
* @param {number} [fromIndex=0] The index to search from.
|
1405
|
+
* @returns {number} Returns the index of the found element, else `-1`.
|
1406
|
+
* @example
|
1407
|
+
*
|
1408
|
+
* var users = [
|
1409
|
+
* { 'user': 'barney', 'active': false },
|
1410
|
+
* { 'user': 'fred', 'active': false },
|
1411
|
+
* { 'user': 'pebbles', 'active': true }
|
1412
|
+
* ];
|
1413
|
+
*
|
1414
|
+
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
1415
|
+
* // => 0
|
1416
|
+
*
|
1417
|
+
* // The `_.matches` iteratee shorthand.
|
1418
|
+
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
1419
|
+
* // => 1
|
1420
|
+
*
|
1421
|
+
* // The `_.matchesProperty` iteratee shorthand.
|
1422
|
+
* _.findIndex(users, ['active', false]);
|
1423
|
+
* // => 0
|
1424
|
+
*
|
1425
|
+
* // The `_.property` iteratee shorthand.
|
1426
|
+
* _.findIndex(users, 'active');
|
1427
|
+
* // => 2
|
1428
|
+
*/
|
1429
|
+
function findIndex(array, predicate, fromIndex) {
|
1430
|
+
var length = array ? array.length : 0;
|
1431
|
+
if (!length) {
|
1432
|
+
return -1;
|
1433
|
+
}
|
1434
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
1435
|
+
if (index < 0) {
|
1436
|
+
index = nativeMax(length + index, 0);
|
1437
|
+
}
|
1438
|
+
return baseFindIndex(array, baseIteratee(predicate, 3), index);
|
1439
|
+
}
|
1440
|
+
|
1495
1441
|
/**
|
1496
1442
|
* Flattens `array` a single level deep.
|
1497
1443
|
*
|
@@ -1873,6 +1819,7 @@
|
|
1873
1819
|
* @param {Array|Object} collection The collection to search.
|
1874
1820
|
* @param {Array|Function|Object|string} [predicate=_.identity]
|
1875
1821
|
* The function invoked per iteration.
|
1822
|
+
* @param {number} [fromIndex=0] The index to search from.
|
1876
1823
|
* @returns {*} Returns the matched element, else `undefined`.
|
1877
1824
|
* @example
|
1878
1825
|
*
|
@@ -1897,9 +1844,7 @@
|
|
1897
1844
|
* _.find(users, 'active');
|
1898
1845
|
* // => object for 'barney'
|
1899
1846
|
*/
|
1900
|
-
|
1901
|
-
return baseFind(collection, baseIteratee(predicate), baseEach);
|
1902
|
-
}
|
1847
|
+
var find = createFind(findIndex);
|
1903
1848
|
|
1904
1849
|
/**
|
1905
1850
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
@@ -2182,7 +2127,7 @@
|
|
2182
2127
|
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
|
2183
2128
|
* may be used as a placeholder for partially applied arguments.
|
2184
2129
|
*
|
2185
|
-
* **Note:** Unlike native `Function#bind
|
2130
|
+
* **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
|
2186
2131
|
* property of bound functions.
|
2187
2132
|
*
|
2188
2133
|
* @static
|
@@ -2993,7 +2938,7 @@
|
|
2993
2938
|
/**
|
2994
2939
|
* Converts `value` to an integer.
|
2995
2940
|
*
|
2996
|
-
* **Note:** This
|
2941
|
+
* **Note:** This method is loosely based on
|
2997
2942
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
|
2998
2943
|
*
|
2999
2944
|
* @static
|
@@ -3301,25 +3246,7 @@
|
|
3301
3246
|
* _.keys('hi');
|
3302
3247
|
* // => ['0', '1']
|
3303
3248
|
*/
|
3304
|
-
|
3305
|
-
var isProto = isPrototype(object);
|
3306
|
-
if (!(isProto || isArrayLike(object))) {
|
3307
|
-
return baseKeys(object);
|
3308
|
-
}
|
3309
|
-
var indexes = indexKeys(object),
|
3310
|
-
skipIndexes = !!indexes,
|
3311
|
-
result = indexes || [],
|
3312
|
-
length = result.length;
|
3313
|
-
|
3314
|
-
for (var key in object) {
|
3315
|
-
if (hasOwnProperty.call(object, key) &&
|
3316
|
-
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
3317
|
-
!(isProto && key == 'constructor')) {
|
3318
|
-
result.push(key);
|
3319
|
-
}
|
3320
|
-
}
|
3321
|
-
return result;
|
3322
|
-
}
|
3249
|
+
var keys = baseKeys;
|
3323
3250
|
|
3324
3251
|
/**
|
3325
3252
|
* Creates an array of the own and inherited enumerable property names of `object`.
|
@@ -3344,25 +3271,7 @@
|
|
3344
3271
|
* _.keysIn(new Foo);
|
3345
3272
|
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
3346
3273
|
*/
|
3347
|
-
|
3348
|
-
var index = -1,
|
3349
|
-
isProto = isPrototype(object),
|
3350
|
-
props = baseKeysIn(object),
|
3351
|
-
propsLength = props.length,
|
3352
|
-
indexes = indexKeys(object),
|
3353
|
-
skipIndexes = !!indexes,
|
3354
|
-
result = indexes || [],
|
3355
|
-
length = result.length;
|
3356
|
-
|
3357
|
-
while (++index < propsLength) {
|
3358
|
-
var key = props[index];
|
3359
|
-
if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
|
3360
|
-
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
3361
|
-
result.push(key);
|
3362
|
-
}
|
3363
|
-
}
|
3364
|
-
return result;
|
3365
|
-
}
|
3274
|
+
var keysIn = baseKeysIn;
|
3366
3275
|
|
3367
3276
|
/**
|
3368
3277
|
* Creates an object composed of the picked `object` properties.
|
@@ -3510,7 +3419,7 @@
|
|
3510
3419
|
*
|
3511
3420
|
* var object = { 'user': 'fred' };
|
3512
3421
|
*
|
3513
|
-
* _.identity(object) === object;
|
3422
|
+
* console.log(_.identity(object) === object);
|
3514
3423
|
* // => true
|
3515
3424
|
*/
|
3516
3425
|
function identity(value) {
|
@@ -3682,8 +3591,7 @@
|
|
3682
3591
|
}
|
3683
3592
|
|
3684
3593
|
/**
|
3685
|
-
* A
|
3686
|
-
* arguments it receives.
|
3594
|
+
* A method that returns `undefined`.
|
3687
3595
|
*
|
3688
3596
|
* @static
|
3689
3597
|
* @memberOf _
|
@@ -3691,10 +3599,8 @@
|
|
3691
3599
|
* @category Util
|
3692
3600
|
* @example
|
3693
3601
|
*
|
3694
|
-
*
|
3695
|
-
*
|
3696
|
-
* _.noop(object) === undefined;
|
3697
|
-
* // => true
|
3602
|
+
* _.times(2, _.noop);
|
3603
|
+
* // => [undefined, undefined]
|
3698
3604
|
*/
|
3699
3605
|
function noop() {
|
3700
3606
|
// No operation performed.
|
@@ -3900,7 +3806,7 @@
|
|
3900
3806
|
// also prevents errors in cases where Lodash is loaded by a script tag in the
|
3901
3807
|
// presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch
|
3902
3808
|
// for more details. Use `_.noConflict` to remove Lodash from the global object.
|
3903
|
-
(
|
3809
|
+
(freeSelf || {})._ = lodash;
|
3904
3810
|
|
3905
3811
|
// Some AMD build optimizers like r.js check for condition patterns like the following:
|
3906
3812
|
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
|
@@ -3911,11 +3817,9 @@
|
|
3911
3817
|
});
|
3912
3818
|
}
|
3913
3819
|
// Check for `exports` after `define` in case a build optimizer adds an `exports` object.
|
3914
|
-
else if (
|
3820
|
+
else if (freeModule) {
|
3915
3821
|
// Export for Node.js.
|
3916
|
-
|
3917
|
-
(freeModule.exports = lodash)._ = lodash;
|
3918
|
-
}
|
3822
|
+
(freeModule.exports = lodash)._ = lodash;
|
3919
3823
|
// Export for CommonJS support.
|
3920
3824
|
freeExports._ = lodash;
|
3921
3825
|
}
|