lodash-rails 4.3.0 → 4.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 683705034482d70a5b12cbcb5ca04230e3bd6d30
4
- data.tar.gz: 136a0a2258f0175b5ef3e55dccfb47e44e094a05
3
+ metadata.gz: 4a083a2cda5c5b12200adec4f909e7b6f9926e36
4
+ data.tar.gz: 20a28f1493f3e3f6a45ac6c26bb8879ff1012f5d
5
5
  SHA512:
6
- metadata.gz: 5ec2e5c60c03cff8d00468fd236c8c48f395a35c89395ec57efe6e0508f1a2eb2beda7e3c26307894c58f46a8048a0069f58e202785330c50d1d26b0dc0c6770
7
- data.tar.gz: 864719375289876c63b51db448c4f716d62492d81afb9474f346d79989f32937e1e96843b2dfb5a5c844c2047c39667b1f51e7ce0fd86c41503658316aef7d18
6
+ metadata.gz: fbf1205a61922f51bcfbe3f8ca0d920eae7aca3b55477ab39a4484c1a509084c1b2a0b44779bb926d2491b18ce753a19a75b82b038a9e978817abbf4acc1c40e
7
+ data.tar.gz: 5763712159a8ac02d3d458923a5b7c09c843ed36e3fab1d8747e7eeaaf6137ff8555bbb335a98257d64088cdbb21a3a39a519ed827f1d71a3705d66ce2ac784c
data/README.md CHANGED
@@ -18,7 +18,7 @@ Add the necessary library to `app/assets/javascripts/application.js`:
18
18
 
19
19
  ## What's included?
20
20
 
21
- lodash 4.3.0:
21
+ lodash 4.5.1:
22
22
 
23
23
  * lodash.core.js
24
24
  * lodash.core.min.js
@@ -1,5 +1,5 @@
1
1
  module LoDash
2
2
  module Rails
3
- VERSION = "4.3.0"
3
+ VERSION = "4.5.1"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.3.0 (Custom Build) <https://lodash.com/>
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.3.0';
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 MAX_SAFE_INTEGER = 9007199254740991;
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) ? exports : null;
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) ? module : null;
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 || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
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
- * `at`, `before`, `bind`, `bindAll`, `bindKey`, `chain`, `chunk`, `commit`,
418
- * `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, `curry`,
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`, `flip`, `flow`,
422
- * `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`,
423
- * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invertBy`,
424
- * `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`,
425
- * `mapValues`, `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`,
426
- * `method`, `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`,
427
- * `orderBy`, `over`, `overArgs`, `overEvery`, `overSome`, `partial`,
428
- * `partialRight`, `partition`, `pick`, `pickBy`, `plant`, `property`,
429
- * `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`,
430
- * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`,
431
- * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`,
432
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`,
433
- * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`,
434
- * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`,
435
- * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`,
436
- * `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`,
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
- * `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`,
444
- * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
445
- * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
446
- * `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
447
- * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
448
- * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,
449
- * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
450
- * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,
451
- * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,
452
- * `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,
453
- * `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
454
- * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
455
- * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
456
- * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
457
- * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`,
458
- * `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`,
459
- * `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
460
- * `upperCase`, `upperFirst`, `value`, and `words`
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 ((!eq(objValue, value) ||
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
- var baseCreate = (function() {
561
- function object() {}
562
- return function(prototype) {
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 {boolean} [isDeep] Specify a deep flatten.
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, isDeep, isStrict, result) {
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 (isDeep) {
667
+ if (depth > 1) {
655
668
  // Recursively flatten arrays (susceptible to call stack limits).
656
- baseFlatten(value, isDeep, isStrict, result);
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
- newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
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' ? (length--, customizer) : undefined;
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 = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
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
- * This method is like `_.flatten` except that it recursively flattens `array`.
1484
+ * Recursively flattens `array`.
1478
1485
  *
1479
1486
  * @static
1480
1487
  * @memberOf _
1481
1488
  * @category Array
1482
- * @param {Array} array The array to recursively flatten.
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, true) : [];
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, toFunction(iteratee));
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) || isFunction(value.splice) || isArguments(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' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
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 properties, otherwise it returns `false`.
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 partial comparison between a given
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