lodash-rails 4.3.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lodash/rails/version.rb +1 -1
- data/vendor/assets/javascripts/lodash.core.js +114 -105
- data/vendor/assets/javascripts/lodash.core.min.js +25 -26
- data/vendor/assets/javascripts/lodash.js +514 -312
- data/vendor/assets/javascripts/lodash.min.js +108 -108
- 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: 4a083a2cda5c5b12200adec4f909e7b6f9926e36
|
4
|
+
data.tar.gz: 20a28f1493f3e3f6a45ac6c26bb8879ff1012f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbf1205a61922f51bcfbe3f8ca0d920eae7aca3b55477ab39a4484c1a509084c1b2a0b44779bb926d2491b18ce753a19a75b82b038a9e978817abbf4acc1c40e
|
7
|
+
data.tar.gz: 5763712159a8ac02d3d458923a5b7c09c843ed36e3fab1d8747e7eeaaf6137ff8555bbb335a98257d64088cdbb21a3a39a519ed827f1d71a3705d66ce2ac784c
|
data/README.md
CHANGED
data/lib/lodash/rails/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash 4.
|
3
|
+
* lodash 4.5.1 (Custom Build) <https://lodash.com/>
|
4
4
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
5
5
|
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
var undefined;
|
14
14
|
|
15
15
|
/** Used as the semantic version number. */
|
16
|
-
var VERSION = '4.
|
16
|
+
var VERSION = '4.5.1';
|
17
17
|
|
18
18
|
/** Used to compose bitmasks for wrapper metadata. */
|
19
19
|
var BIND_FLAG = 1,
|
@@ -27,7 +27,8 @@
|
|
27
27
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
28
28
|
|
29
29
|
/** Used as references for various `Number` constants. */
|
30
|
-
var
|
30
|
+
var INFINITY = 1 / 0,
|
31
|
+
MAX_SAFE_INTEGER = 9007199254740991;
|
31
32
|
|
32
33
|
/** `Object#toString` result references. */
|
33
34
|
var argsTag = '[object Arguments]',
|
@@ -66,10 +67,19 @@
|
|
66
67
|
};
|
67
68
|
|
68
69
|
/** Detect free variable `exports`. */
|
69
|
-
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
|
70
|
+
var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
|
71
|
+
? exports
|
72
|
+
: undefined;
|
70
73
|
|
71
74
|
/** Detect free variable `module`. */
|
72
|
-
var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
|
75
|
+
var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
|
76
|
+
? module
|
77
|
+
: undefined;
|
78
|
+
|
79
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
80
|
+
var moduleExports = (freeModule && freeModule.exports === freeExports)
|
81
|
+
? freeExports
|
82
|
+
: undefined;
|
73
83
|
|
74
84
|
/** Detect free variable `global` from Node.js. */
|
75
85
|
var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
@@ -80,9 +90,6 @@
|
|
80
90
|
/** Detect free variable `window`. */
|
81
91
|
var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
82
92
|
|
83
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
84
|
-
var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null;
|
85
|
-
|
86
93
|
/** Detect `this` as the global object. */
|
87
94
|
var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
88
95
|
|
@@ -92,7 +99,9 @@
|
|
92
99
|
* The `this` value is used if it's the global object to avoid Greasemonkey's
|
93
100
|
* restricted `window` object, otherwise the `window` object is used.
|
94
101
|
*/
|
95
|
-
var root = freeGlobal ||
|
102
|
+
var root = freeGlobal ||
|
103
|
+
((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
|
104
|
+
freeSelf || thisGlobal || Function('return this')();
|
96
105
|
|
97
106
|
/*--------------------------------------------------------------------------*/
|
98
107
|
|
@@ -365,6 +374,7 @@
|
|
365
374
|
Symbol = root.Symbol,
|
366
375
|
Uint8Array = root.Uint8Array,
|
367
376
|
enumerate = Reflect ? Reflect.enumerate : undefined,
|
377
|
+
objectCreate = Object.create,
|
368
378
|
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
369
379
|
|
370
380
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
@@ -413,51 +423,52 @@
|
|
413
423
|
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
|
414
424
|
*
|
415
425
|
* The chainable wrapper methods are:
|
416
|
-
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`,
|
417
|
-
* `
|
418
|
-
* `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
|
419
|
-
* `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
|
426
|
+
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
|
427
|
+
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
|
428
|
+
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
|
429
|
+
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
|
420
430
|
* `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,
|
421
|
-
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `
|
422
|
-
* `
|
423
|
-
* `
|
424
|
-
* `
|
425
|
-
* `
|
426
|
-
* `
|
427
|
-
* `
|
428
|
-
* `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
|
429
|
-
* `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
|
430
|
-
* `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
|
431
|
-
* `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
|
432
|
-
* `
|
433
|
-
* `
|
434
|
-
* `
|
435
|
-
* `
|
436
|
-
* `
|
437
|
-
* `zipObjectDeep`, and `zipWith`
|
431
|
+
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`,
|
432
|
+
* `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`,
|
433
|
+
* `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`,
|
434
|
+
* `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`,
|
435
|
+
* `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
|
436
|
+
* `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`,
|
437
|
+
* `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`,
|
438
|
+
* `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
|
439
|
+
* `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
|
440
|
+
* `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
|
441
|
+
* `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
|
442
|
+
* `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`,
|
443
|
+
* `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`,
|
444
|
+
* `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`,
|
445
|
+
* `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`,
|
446
|
+
* `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`,
|
447
|
+
* `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith`
|
438
448
|
*
|
439
449
|
* The wrapper methods that are **not** chainable by default are:
|
440
450
|
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
|
441
451
|
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
|
442
|
-
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
|
443
|
-
* `
|
444
|
-
* `
|
445
|
-
* `
|
446
|
-
* `
|
447
|
-
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
|
448
|
-
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `
|
449
|
-
* `
|
450
|
-
* `
|
451
|
-
* `
|
452
|
-
* `
|
453
|
-
* `
|
454
|
-
* `
|
455
|
-
* `
|
456
|
-
* `
|
457
|
-
* `
|
458
|
-
* `
|
459
|
-
* `
|
460
|
-
* `
|
452
|
+
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
|
453
|
+
* `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
|
454
|
+
* `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
|
455
|
+
* `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
|
456
|
+
* `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
|
457
|
+
* `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
|
458
|
+
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
|
459
|
+
* `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
|
460
|
+
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
|
461
|
+
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
|
462
|
+
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
|
463
|
+
* `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
|
464
|
+
* `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
|
465
|
+
* `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
|
466
|
+
* `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
|
467
|
+
* `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
|
468
|
+
* `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
|
469
|
+
* `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
|
470
|
+
* `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
|
471
|
+
* `value`, and `words`
|
461
472
|
*
|
462
473
|
* @name _
|
463
474
|
* @constructor
|
@@ -542,13 +553,23 @@
|
|
542
553
|
*/
|
543
554
|
function assignValue(object, key, value) {
|
544
555
|
var objValue = object[key];
|
545
|
-
if ((
|
546
|
-
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
|
556
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
547
557
|
(value === undefined && !(key in object))) {
|
548
558
|
object[key] = value;
|
549
559
|
}
|
550
560
|
}
|
551
561
|
|
562
|
+
/**
|
563
|
+
* Casts `value` to `identity` if it's not a function.
|
564
|
+
*
|
565
|
+
* @private
|
566
|
+
* @param {*} value The value to inspect.
|
567
|
+
* @returns {Array} Returns the array-like object.
|
568
|
+
*/
|
569
|
+
function baseCastFunction(value) {
|
570
|
+
return typeof value == 'function' ? value : identity;
|
571
|
+
}
|
572
|
+
|
552
573
|
/**
|
553
574
|
* The base implementation of `_.create` without support for assigning
|
554
575
|
* properties to the created object.
|
@@ -557,17 +578,9 @@
|
|
557
578
|
* @param {Object} prototype The object to inherit from.
|
558
579
|
* @returns {Object} Returns the new object.
|
559
580
|
*/
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
if (isObject(prototype)) {
|
564
|
-
object.prototype = prototype;
|
565
|
-
var result = new object;
|
566
|
-
object.prototype = undefined;
|
567
|
-
}
|
568
|
-
return result || {};
|
569
|
-
};
|
570
|
-
}());
|
581
|
+
function baseCreate(proto) {
|
582
|
+
return isObject(proto) ? objectCreate(proto) : {};
|
583
|
+
}
|
571
584
|
|
572
585
|
/**
|
573
586
|
* The base implementation of `_.delay` and `_.defer` which accepts an array
|
@@ -636,12 +649,12 @@
|
|
636
649
|
*
|
637
650
|
* @private
|
638
651
|
* @param {Array} array The array to flatten.
|
639
|
-
* @param {
|
652
|
+
* @param {number} depth The maximum recursion depth.
|
640
653
|
* @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
|
641
654
|
* @param {Array} [result=[]] The initial result value.
|
642
655
|
* @returns {Array} Returns the new flattened array.
|
643
656
|
*/
|
644
|
-
function baseFlatten(array,
|
657
|
+
function baseFlatten(array, depth, isStrict, result) {
|
645
658
|
result || (result = []);
|
646
659
|
|
647
660
|
var index = -1,
|
@@ -649,11 +662,11 @@
|
|
649
662
|
|
650
663
|
while (++index < length) {
|
651
664
|
var value = array[index];
|
652
|
-
if (isArrayLikeObject(value) &&
|
665
|
+
if (depth > 0 && isArrayLikeObject(value) &&
|
653
666
|
(isStrict || isArray(value) || isArguments(value))) {
|
654
|
-
if (
|
667
|
+
if (depth > 1) {
|
655
668
|
// Recursively flatten arrays (susceptible to call stack limits).
|
656
|
-
baseFlatten(value,
|
669
|
+
baseFlatten(value, depth - 1, isStrict, result);
|
657
670
|
} else {
|
658
671
|
arrayPush(result, value);
|
659
672
|
}
|
@@ -816,7 +829,6 @@
|
|
816
829
|
* property of prototypes or treat sparse arrays as dense.
|
817
830
|
*
|
818
831
|
* @private
|
819
|
-
* @type Function
|
820
832
|
* @param {Object} object The object to query.
|
821
833
|
* @returns {Array} Returns the array of property names.
|
822
834
|
*/
|
@@ -1032,8 +1044,11 @@
|
|
1032
1044
|
length = props.length;
|
1033
1045
|
|
1034
1046
|
while (++index < length) {
|
1035
|
-
var key = props[index]
|
1036
|
-
|
1047
|
+
var key = props[index];
|
1048
|
+
|
1049
|
+
var newValue = customizer
|
1050
|
+
? customizer(object[key], source[key], key, object, source)
|
1051
|
+
: source[key];
|
1037
1052
|
|
1038
1053
|
assignValue(object, key, newValue);
|
1039
1054
|
}
|
@@ -1053,7 +1068,10 @@
|
|
1053
1068
|
length = sources.length,
|
1054
1069
|
customizer = length > 1 ? sources[length - 1] : undefined;
|
1055
1070
|
|
1056
|
-
customizer = typeof customizer == 'function'
|
1071
|
+
customizer = typeof customizer == 'function'
|
1072
|
+
? (length--, customizer)
|
1073
|
+
: undefined;
|
1074
|
+
|
1057
1075
|
object = Object(object);
|
1058
1076
|
while (++index < length) {
|
1059
1077
|
var source = sources[index];
|
@@ -1377,22 +1395,11 @@
|
|
1377
1395
|
*/
|
1378
1396
|
function isPrototype(value) {
|
1379
1397
|
var Ctor = value && value.constructor,
|
1380
|
-
proto = (
|
1398
|
+
proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
|
1381
1399
|
|
1382
1400
|
return value === proto;
|
1383
1401
|
}
|
1384
1402
|
|
1385
|
-
/**
|
1386
|
-
* Converts `value` to a function if it's not one.
|
1387
|
-
*
|
1388
|
-
* @private
|
1389
|
-
* @param {*} value The value to process.
|
1390
|
-
* @returns {Function} Returns the function.
|
1391
|
-
*/
|
1392
|
-
function toFunction(value) {
|
1393
|
-
return typeof value == 'function' ? value : identity;
|
1394
|
-
}
|
1395
|
-
|
1396
1403
|
/**
|
1397
1404
|
* Creates a clone of `wrapper`.
|
1398
1405
|
*
|
@@ -1451,12 +1458,12 @@
|
|
1451
1458
|
if (!isArray(array)) {
|
1452
1459
|
array = array == null ? [] : [Object(array)];
|
1453
1460
|
}
|
1454
|
-
values = baseFlatten(values);
|
1461
|
+
values = baseFlatten(values, 1);
|
1455
1462
|
return arrayConcat(array, values);
|
1456
1463
|
});
|
1457
1464
|
|
1458
1465
|
/**
|
1459
|
-
* Flattens `array` a single level.
|
1466
|
+
* Flattens `array` a single level deep.
|
1460
1467
|
*
|
1461
1468
|
* @static
|
1462
1469
|
* @memberOf _
|
@@ -1465,30 +1472,30 @@
|
|
1465
1472
|
* @returns {Array} Returns the new flattened array.
|
1466
1473
|
* @example
|
1467
1474
|
*
|
1468
|
-
* _.flatten([1, [2, 3, [4]]]);
|
1469
|
-
* // => [1, 2, 3, [4]]
|
1475
|
+
* _.flatten([1, [2, [3, [4]], 5]]);
|
1476
|
+
* // => [1, 2, [3, [4]], 5]
|
1470
1477
|
*/
|
1471
1478
|
function flatten(array) {
|
1472
1479
|
var length = array ? array.length : 0;
|
1473
|
-
return length ? baseFlatten(array) : [];
|
1480
|
+
return length ? baseFlatten(array, 1) : [];
|
1474
1481
|
}
|
1475
1482
|
|
1476
1483
|
/**
|
1477
|
-
*
|
1484
|
+
* Recursively flattens `array`.
|
1478
1485
|
*
|
1479
1486
|
* @static
|
1480
1487
|
* @memberOf _
|
1481
1488
|
* @category Array
|
1482
|
-
* @param {Array} array The array to
|
1489
|
+
* @param {Array} array The array to flatten.
|
1483
1490
|
* @returns {Array} Returns the new flattened array.
|
1484
1491
|
* @example
|
1485
1492
|
*
|
1486
|
-
* _.flattenDeep([1, [2, 3, [4]]]);
|
1487
|
-
* // => [1, 2, 3, 4]
|
1493
|
+
* _.flattenDeep([1, [2, [3, [4]], 5]]);
|
1494
|
+
* // => [1, 2, 3, 4, 5]
|
1488
1495
|
*/
|
1489
1496
|
function flattenDeep(array) {
|
1490
1497
|
var length = array ? array.length : 0;
|
1491
|
-
return length ? baseFlatten(array,
|
1498
|
+
return length ? baseFlatten(array, INFINITY) : [];
|
1492
1499
|
}
|
1493
1500
|
|
1494
1501
|
/**
|
@@ -1872,7 +1879,7 @@
|
|
1872
1879
|
* // => logs 'a' then 'b' (iteration order is not guaranteed)
|
1873
1880
|
*/
|
1874
1881
|
function forEach(collection, iteratee) {
|
1875
|
-
return baseEach(collection,
|
1882
|
+
return baseEach(collection, baseCastFunction(iteratee));
|
1876
1883
|
}
|
1877
1884
|
|
1878
1885
|
/**
|
@@ -2400,7 +2407,7 @@
|
|
2400
2407
|
*
|
2401
2408
|
* @static
|
2402
2409
|
* @memberOf _
|
2403
|
-
* @type Function
|
2410
|
+
* @type {Function}
|
2404
2411
|
* @category Lang
|
2405
2412
|
* @param {*} value The value to check.
|
2406
2413
|
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
@@ -2427,7 +2434,6 @@
|
|
2427
2434
|
*
|
2428
2435
|
* @static
|
2429
2436
|
* @memberOf _
|
2430
|
-
* @type Function
|
2431
2437
|
* @category Lang
|
2432
2438
|
* @param {*} value The value to check.
|
2433
2439
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
@@ -2456,7 +2462,6 @@
|
|
2456
2462
|
*
|
2457
2463
|
* @static
|
2458
2464
|
* @memberOf _
|
2459
|
-
* @type Function
|
2460
2465
|
* @category Lang
|
2461
2466
|
* @param {*} value The value to check.
|
2462
2467
|
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
|
@@ -2548,7 +2553,8 @@
|
|
2548
2553
|
*/
|
2549
2554
|
function isEmpty(value) {
|
2550
2555
|
if (isArrayLike(value) &&
|
2551
|
-
(isArray(value) || isString(value) ||
|
2556
|
+
(isArray(value) || isString(value) ||
|
2557
|
+
isFunction(value.splice) || isArguments(value))) {
|
2552
2558
|
return !value.length;
|
2553
2559
|
}
|
2554
2560
|
for (var key in value) {
|
@@ -2667,7 +2673,8 @@
|
|
2667
2673
|
* // => false
|
2668
2674
|
*/
|
2669
2675
|
function isLength(value) {
|
2670
|
-
return typeof value == 'number' &&
|
2676
|
+
return typeof value == 'number' &&
|
2677
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
2671
2678
|
}
|
2672
2679
|
|
2673
2680
|
/**
|
@@ -3295,7 +3302,7 @@
|
|
3295
3302
|
* // => { 'a': 1, 'c': 3 }
|
3296
3303
|
*/
|
3297
3304
|
var pick = rest(function(object, props) {
|
3298
|
-
return object == null ? {} : basePick(object, baseFlatten(props));
|
3305
|
+
return object == null ? {} : basePick(object, baseFlatten(props, 1));
|
3299
3306
|
});
|
3300
3307
|
|
3301
3308
|
/**
|
@@ -3429,7 +3436,8 @@
|
|
3429
3436
|
* Creates a function that invokes `func` with the arguments of the created
|
3430
3437
|
* function. If `func` is a property name the created callback returns the
|
3431
3438
|
* property value for a given element. If `func` is an object the created
|
3432
|
-
* callback returns `true` for elements that contain the equivalent object
|
3439
|
+
* callback returns `true` for elements that contain the equivalent object
|
3440
|
+
* properties, otherwise it returns `false`.
|
3433
3441
|
*
|
3434
3442
|
* @static
|
3435
3443
|
* @memberOf _
|
@@ -3457,9 +3465,10 @@
|
|
3457
3465
|
var iteratee = baseIteratee;
|
3458
3466
|
|
3459
3467
|
/**
|
3460
|
-
* Creates a function that performs a deep
|
3468
|
+
* Creates a function that performs a partial deep comparison between a given
|
3461
3469
|
* object and `source`, returning `true` if the given object has equivalent
|
3462
|
-
* property values, else `false`.
|
3470
|
+
* property values, else `false`. The created function is equivalent to
|
3471
|
+
* `_.isMatch` with a `source` partially applied.
|
3463
3472
|
*
|
3464
3473
|
* **Note:** This method supports comparing the same values as `_.isEqual`.
|
3465
3474
|
*
|
@@ -3597,7 +3606,7 @@
|
|
3597
3606
|
* @static
|
3598
3607
|
* @memberOf _
|
3599
3608
|
* @category Util
|
3600
|
-
* @param {string} [prefix] The value to prefix the ID with.
|
3609
|
+
* @param {string} [prefix=''] The value to prefix the ID with.
|
3601
3610
|
* @returns {string} Returns the unique ID.
|
3602
3611
|
* @example
|
3603
3612
|
*
|
@@ -3759,7 +3768,7 @@
|
|
3759
3768
|
*
|
3760
3769
|
* @static
|
3761
3770
|
* @memberOf _
|
3762
|
-
* @type string
|
3771
|
+
* @type {string}
|
3763
3772
|
*/
|
3764
3773
|
lodash.VERSION = VERSION;
|
3765
3774
|
|