lodash-rails 4.16.4 → 4.16.6
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 +51 -29
- data/vendor/assets/javascripts/lodash.core.min.js +14 -14
- data/vendor/assets/javascripts/lodash.js +211 -175
- data/vendor/assets/javascripts/lodash.min.js +127 -126
- 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: 0d248b315ca3c39114125653a2c8461329cba0f3
|
4
|
+
data.tar.gz: 7ad073112e6bff73df5507441a3d38f2faf81875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 488c0396641d03d98521c15705df36cd1d9354d2fb2057b39b9245063d614d45ab95afe0bb8b4f2eb35f9d4311c12c20e9aca66d6fea19de56a7c3ce0811c69e
|
7
|
+
data.tar.gz: c5e41e2ee27171546bd5edde67469623a982b725b62c6e1668896fc59f0da64e05658493d4b99ffb8bdaec225b19005265037be1bdbb668d7ca8bcaa39c35510
|
data/README.md
CHANGED
data/lib/lodash/rails/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license
|
3
3
|
* lodash (Custom Build) <https://lodash.com/>
|
4
4
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
5
|
-
* Copyright
|
5
|
+
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
6
6
|
* Released under MIT license <https://lodash.com/license>
|
7
7
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
8
8
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
@@ -13,7 +13,7 @@
|
|
13
13
|
var undefined;
|
14
14
|
|
15
15
|
/** Used as the semantic version number. */
|
16
|
-
var VERSION = '4.16.
|
16
|
+
var VERSION = '4.16.6';
|
17
17
|
|
18
18
|
/** Error message constants. */
|
19
19
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
@@ -33,6 +33,7 @@
|
|
33
33
|
/** `Object#toString` result references. */
|
34
34
|
var argsTag = '[object Arguments]',
|
35
35
|
arrayTag = '[object Array]',
|
36
|
+
asyncTag = '[object AsyncFunction]',
|
36
37
|
boolTag = '[object Boolean]',
|
37
38
|
dateTag = '[object Date]',
|
38
39
|
errorTag = '[object Error]',
|
@@ -214,7 +215,7 @@
|
|
214
215
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
215
216
|
* of values.
|
216
217
|
*/
|
217
|
-
var
|
218
|
+
var nativeObjectToString = objectProto.toString;
|
218
219
|
|
219
220
|
/** Used to restore the original `_` reference in `_.noConflict`. */
|
220
221
|
var oldDash = root._;
|
@@ -610,6 +611,17 @@
|
|
610
611
|
});
|
611
612
|
}
|
612
613
|
|
614
|
+
/**
|
615
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
616
|
+
*
|
617
|
+
* @private
|
618
|
+
* @param {*} value The value to query.
|
619
|
+
* @returns {string} Returns the `toStringTag`.
|
620
|
+
*/
|
621
|
+
function baseGetTag(value) {
|
622
|
+
return objectToString(value);
|
623
|
+
}
|
624
|
+
|
613
625
|
/**
|
614
626
|
* The base implementation of `_.gt` which doesn't coerce arguments.
|
615
627
|
*
|
@@ -640,7 +652,7 @@
|
|
640
652
|
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
|
641
653
|
*/
|
642
654
|
function baseIsDate(value) {
|
643
|
-
return isObjectLike(value) &&
|
655
|
+
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
644
656
|
}
|
645
657
|
|
646
658
|
/**
|
@@ -690,11 +702,11 @@
|
|
690
702
|
othTag = arrayTag;
|
691
703
|
|
692
704
|
if (!objIsArr) {
|
693
|
-
objTag =
|
705
|
+
objTag = baseGetTag(object);
|
694
706
|
objTag = objTag == argsTag ? objectTag : objTag;
|
695
707
|
}
|
696
708
|
if (!othIsArr) {
|
697
|
-
othTag =
|
709
|
+
othTag = baseGetTag(other);
|
698
710
|
othTag = othTag == argsTag ? objectTag : othTag;
|
699
711
|
}
|
700
712
|
var objIsObj = objTag == objectTag,
|
@@ -749,7 +761,7 @@
|
|
749
761
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
750
762
|
*/
|
751
763
|
function baseIsRegExp(value) {
|
752
|
-
return
|
764
|
+
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
753
765
|
}
|
754
766
|
|
755
767
|
/**
|
@@ -1381,6 +1393,17 @@
|
|
1381
1393
|
return result;
|
1382
1394
|
}
|
1383
1395
|
|
1396
|
+
/**
|
1397
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
1398
|
+
*
|
1399
|
+
* @private
|
1400
|
+
* @param {*} value The value to convert.
|
1401
|
+
* @returns {string} Returns the converted string.
|
1402
|
+
*/
|
1403
|
+
function objectToString(value) {
|
1404
|
+
return nativeObjectToString.call(value);
|
1405
|
+
}
|
1406
|
+
|
1384
1407
|
/**
|
1385
1408
|
* A specialized version of `baseRest` which transforms the rest array.
|
1386
1409
|
*
|
@@ -1497,8 +1520,7 @@
|
|
1497
1520
|
* @since 1.1.0
|
1498
1521
|
* @category Array
|
1499
1522
|
* @param {Array} array The array to inspect.
|
1500
|
-
* @param {Function} [predicate=_.identity]
|
1501
|
-
* The function invoked per iteration.
|
1523
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
1502
1524
|
* @param {number} [fromIndex=0] The index to search from.
|
1503
1525
|
* @returns {number} Returns the index of the found element, else `-1`.
|
1504
1526
|
* @example
|
@@ -1525,7 +1547,7 @@
|
|
1525
1547
|
* // => 2
|
1526
1548
|
*/
|
1527
1549
|
function findIndex(array, predicate, fromIndex) {
|
1528
|
-
var length = array ? array.length
|
1550
|
+
var length = array == null ? 0 : array.length;
|
1529
1551
|
if (!length) {
|
1530
1552
|
return -1;
|
1531
1553
|
}
|
@@ -1551,7 +1573,7 @@
|
|
1551
1573
|
* // => [1, 2, [3, [4]], 5]
|
1552
1574
|
*/
|
1553
1575
|
function flatten(array) {
|
1554
|
-
var length = array ? array.length
|
1576
|
+
var length = array == null ? 0 : array.length;
|
1555
1577
|
return length ? baseFlatten(array, 1) : [];
|
1556
1578
|
}
|
1557
1579
|
|
@@ -1570,7 +1592,7 @@
|
|
1570
1592
|
* // => [1, 2, 3, 4, 5]
|
1571
1593
|
*/
|
1572
1594
|
function flattenDeep(array) {
|
1573
|
-
var length = array ? array.length
|
1595
|
+
var length = array == null ? 0 : array.length;
|
1574
1596
|
return length ? baseFlatten(array, INFINITY) : [];
|
1575
1597
|
}
|
1576
1598
|
|
@@ -1620,7 +1642,7 @@
|
|
1620
1642
|
* // => 3
|
1621
1643
|
*/
|
1622
1644
|
function indexOf(array, value, fromIndex) {
|
1623
|
-
var length = array ? array.length
|
1645
|
+
var length = array == null ? 0 : array.length;
|
1624
1646
|
if (typeof fromIndex == 'number') {
|
1625
1647
|
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
|
1626
1648
|
} else {
|
@@ -1653,7 +1675,7 @@
|
|
1653
1675
|
* // => 3
|
1654
1676
|
*/
|
1655
1677
|
function last(array) {
|
1656
|
-
var length = array ? array.length
|
1678
|
+
var length = array == null ? 0 : array.length;
|
1657
1679
|
return length ? array[length - 1] : undefined;
|
1658
1680
|
}
|
1659
1681
|
|
@@ -1674,7 +1696,7 @@
|
|
1674
1696
|
* @returns {Array} Returns the slice of `array`.
|
1675
1697
|
*/
|
1676
1698
|
function slice(array, start, end) {
|
1677
|
-
var length = array ? array.length
|
1699
|
+
var length = array == null ? 0 : array.length;
|
1678
1700
|
start = start == null ? 0 : +start;
|
1679
1701
|
end = end === undefined ? length : +end;
|
1680
1702
|
return length ? baseSlice(array, start, end) : [];
|
@@ -1838,8 +1860,7 @@
|
|
1838
1860
|
* @since 0.1.0
|
1839
1861
|
* @category Collection
|
1840
1862
|
* @param {Array|Object} collection The collection to iterate over.
|
1841
|
-
* @param {Function} [predicate=_.identity]
|
1842
|
-
* The function invoked per iteration.
|
1863
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
1843
1864
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
1844
1865
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
1845
1866
|
* else `false`.
|
@@ -1882,8 +1903,7 @@
|
|
1882
1903
|
* @since 0.1.0
|
1883
1904
|
* @category Collection
|
1884
1905
|
* @param {Array|Object} collection The collection to iterate over.
|
1885
|
-
* @param {Function} [predicate=_.identity]
|
1886
|
-
* The function invoked per iteration.
|
1906
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
1887
1907
|
* @returns {Array} Returns the new filtered array.
|
1888
1908
|
* @see _.reject
|
1889
1909
|
* @example
|
@@ -1922,8 +1942,7 @@
|
|
1922
1942
|
* @since 0.1.0
|
1923
1943
|
* @category Collection
|
1924
1944
|
* @param {Array|Object} collection The collection to inspect.
|
1925
|
-
* @param {Function} [predicate=_.identity]
|
1926
|
-
* The function invoked per iteration.
|
1945
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
1927
1946
|
* @param {number} [fromIndex=0] The index to search from.
|
1928
1947
|
* @returns {*} Returns the matched element, else `undefined`.
|
1929
1948
|
* @example
|
@@ -2521,7 +2540,7 @@
|
|
2521
2540
|
*/
|
2522
2541
|
function isBoolean(value) {
|
2523
2542
|
return value === true || value === false ||
|
2524
|
-
(isObjectLike(value) &&
|
2543
|
+
(isObjectLike(value) && baseGetTag(value) == boolTag);
|
2525
2544
|
}
|
2526
2545
|
|
2527
2546
|
/**
|
@@ -2665,10 +2684,13 @@
|
|
2665
2684
|
* // => false
|
2666
2685
|
*/
|
2667
2686
|
function isFunction(value) {
|
2687
|
+
if (!isObject(value)) {
|
2688
|
+
return false;
|
2689
|
+
}
|
2668
2690
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
2669
|
-
// in Safari 9 which returns 'object' for typed
|
2670
|
-
var tag =
|
2671
|
-
return tag == funcTag || tag == genTag || tag == proxyTag;
|
2691
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
2692
|
+
var tag = baseGetTag(value);
|
2693
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
2672
2694
|
}
|
2673
2695
|
|
2674
2696
|
/**
|
@@ -2844,7 +2866,7 @@
|
|
2844
2866
|
*/
|
2845
2867
|
function isNumber(value) {
|
2846
2868
|
return typeof value == 'number' ||
|
2847
|
-
(isObjectLike(value) &&
|
2869
|
+
(isObjectLike(value) && baseGetTag(value) == numberTag);
|
2848
2870
|
}
|
2849
2871
|
|
2850
2872
|
/**
|
@@ -2885,7 +2907,7 @@
|
|
2885
2907
|
*/
|
2886
2908
|
function isString(value) {
|
2887
2909
|
return typeof value == 'string' ||
|
2888
|
-
(!isArray(value) && isObjectLike(value) &&
|
2910
|
+
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
2889
2911
|
}
|
2890
2912
|
|
2891
2913
|
/**
|
@@ -3162,7 +3184,7 @@
|
|
3162
3184
|
*/
|
3163
3185
|
function create(prototype, properties) {
|
3164
3186
|
var result = baseCreate(prototype);
|
3165
|
-
return properties ? assign(result, properties)
|
3187
|
+
return properties == null ? result : assign(result, properties);
|
3166
3188
|
}
|
3167
3189
|
|
3168
3190
|
/**
|
@@ -3362,7 +3384,7 @@
|
|
3362
3384
|
* // => ['h', 'i']
|
3363
3385
|
*/
|
3364
3386
|
function values(object) {
|
3365
|
-
return object ? baseValues(object, keys(object))
|
3387
|
+
return object == null ? [] : baseValues(object, keys(object));
|
3366
3388
|
}
|
3367
3389
|
|
3368
3390
|
/*------------------------------------------------------------------------*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
3
|
+
* lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
4
4
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
5
5
|
*/
|
6
6
|
;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return d(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){
|
@@ -9,21 +9,21 @@ if(typeof n!="function")throw new TypeError("Expected a function");return setTim
|
|
9
9
|
var p=En(o,function(t){return t[0]==n}),s=En(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),
|
10
10
|
o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return n<t}function d(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function m(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],nn,3)))return false}return true}}function O(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),
|
11
11
|
t},{})}function x(n){return xn(q(n,void 0,Y),n+"")}function A(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function E(n){return A(n,0,n.length)}function w(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function N(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;
|
12
|
-
if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function S(n){return x(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function
|
13
|
-
for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=
|
12
|
+
if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function S(n){return x(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function T(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];
|
13
|
+
for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=F(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!w(t,function(n,t){if(!z(a,t)&&(l===n||r(l,n,e,u,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=2&u,c=qn(n),f=c.length,a=qn(t).length;
|
14
14
|
if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Sn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function q(n,t,r){
|
15
|
-
return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return
|
16
|
-
}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=
|
17
|
-
}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Sn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return n?u(n,qn(n))
|
18
|
-
var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
|
15
|
+
return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?s(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,_(t))}function G(n,t,r){return e(n,_(t),r,3>arguments.length,mn);
|
16
|
+
}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n;
|
17
|
+
return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Sn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,qn(n))}function Y(n){return n}function Z(n,r,e){var u=qn(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,qn(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);
|
18
|
+
return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
|
19
19
|
return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
|
20
20
|
var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(h),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=String,En=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=_(r);t=qn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){
|
21
|
-
var e=n?n.length
|
22
|
-
}(function(n,t){return null==n?{}:O(n,d(t,An))});o.assignIn=Rn,o.before=J,o.bind=wn,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return p(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Sn(e)?E(e):[e],s(r,1))},o.create=function(n,t){var r=dn(n);return t?Bn(r,t)
|
23
|
-
return
|
24
|
-
criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?E(n):[]:X(n)},o.values=X,o.extend=Rn,Z(o,o),o.clone=function(n){
|
25
|
-
return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,a(n,_(t))},o.find=En,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Sn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Sn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length
|
26
|
-
},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return
|
27
|
-
this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.16.
|
21
|
+
var e=null==n?0:n.length;if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),wn=x(function(n,t,r){return T(n,t,r)}),kn=x(function(n,t){return f(n,1,t)}),Nn=x(function(n,t,r){return f(n,Tn(t)||0,r)}),Sn=Array.isArray,Fn=Number,Tn=Number,Bn=S(function(n,t){N(t,_n(t),n)}),Rn=S(function(n,t){N(t,I(t),n)}),Dn=S(function(n,t,r,e){N(t,$n(t),n,e)}),In=x(function(n){return n.push(nn,c),Dn.apply(nn,n)}),qn=_n,$n=I,Pn=function(n){
|
22
|
+
return xn(q(n,nn,$),n+"")}(function(n,t){return null==n?{}:O(n,d(t,An))});o.assignIn=Rn,o.before=J,o.bind=wn,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return p(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Sn(e)?E(e):[e],s(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Bn(r,t)},o.defaults=In,o.defer=kn,o.delay=Nn,o.filter=function(n,t){return p(n,_(t))},o.flatten=$,
|
23
|
+
o.flattenDeep=function(n){return(null==n?0:n.length)?s(n,tn):[]},o.iteratee=_,o.keys=qn,o.map=function(n,t){return d(n,_(t))},o.matches=function(n){return m(Bn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=Pn,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?A(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=_(t),
|
24
|
+
d(d(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?E(n):[]:X(n)},o.values=X,o.extend=Rn,Z(o,o),o.clone=function(n){
|
25
|
+
return H(n)?Sn(n)?E(n):N(n,_n(n)):n},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,a(n,_(t))},o.find=En,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Sn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Sn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length;
|
26
|
+
},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?l(n,Y,y):nn},o.min=function(n){return n&&n.length?l(n,Y,j):nn},
|
27
|
+
o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.16.6",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
|
28
28
|
var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Sn(u)?u:[],n)}return this[r](function(r){return t.apply(Sn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
|
29
29
|
define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
3
|
* lodash <https://lodash.com/>
|
4
|
-
* Copyright
|
4
|
+
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
5
5
|
* Released under MIT license <https://lodash.com/license>
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
7
7
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
@@ -12,7 +12,7 @@
|
|
12
12
|
var undefined;
|
13
13
|
|
14
14
|
/** Used as the semantic version number. */
|
15
|
-
var VERSION = '4.16.
|
15
|
+
var VERSION = '4.16.6';
|
16
16
|
|
17
17
|
/** Used as the size to enable large array optimizations. */
|
18
18
|
var LARGE_ARRAY_SIZE = 200;
|
@@ -51,7 +51,7 @@
|
|
51
51
|
DEFAULT_TRUNC_OMISSION = '...';
|
52
52
|
|
53
53
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
54
|
-
var HOT_COUNT =
|
54
|
+
var HOT_COUNT = 800,
|
55
55
|
HOT_SPAN = 16;
|
56
56
|
|
57
57
|
/** Used to indicate the type of lazy iteratees. */
|
@@ -86,13 +86,16 @@
|
|
86
86
|
/** `Object#toString` result references. */
|
87
87
|
var argsTag = '[object Arguments]',
|
88
88
|
arrayTag = '[object Array]',
|
89
|
+
asyncTag = '[object AsyncFunction]',
|
89
90
|
boolTag = '[object Boolean]',
|
90
91
|
dateTag = '[object Date]',
|
92
|
+
domExcTag = '[object DOMException]',
|
91
93
|
errorTag = '[object Error]',
|
92
94
|
funcTag = '[object Function]',
|
93
95
|
genTag = '[object GeneratorFunction]',
|
94
96
|
mapTag = '[object Map]',
|
95
97
|
numberTag = '[object Number]',
|
98
|
+
nullTag = '[object Null]',
|
96
99
|
objectTag = '[object Object]',
|
97
100
|
promiseTag = '[object Promise]',
|
98
101
|
proxyTag = '[object Proxy]',
|
@@ -100,6 +103,7 @@
|
|
100
103
|
setTag = '[object Set]',
|
101
104
|
stringTag = '[object String]',
|
102
105
|
symbolTag = '[object Symbol]',
|
106
|
+
undefinedTag = '[object Undefined]',
|
103
107
|
weakMapTag = '[object WeakMap]',
|
104
108
|
weakSetTag = '[object WeakSet]';
|
105
109
|
|
@@ -225,13 +229,15 @@
|
|
225
229
|
rsZWJ = '\\u200d';
|
226
230
|
|
227
231
|
/** Used to compose unicode regexes. */
|
228
|
-
var
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
+
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
233
|
+
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
234
|
+
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
235
|
+
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
232
236
|
reOptMod = rsModifier + '?',
|
233
237
|
rsOptVar = '[' + rsVarRange + ']?',
|
234
238
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
239
|
+
rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
|
240
|
+
rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
|
235
241
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
236
242
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
237
243
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
@@ -250,10 +256,12 @@
|
|
250
256
|
|
251
257
|
/** Used to match complex or compound words. */
|
252
258
|
var reUnicodeWord = RegExp([
|
253
|
-
rsUpper + '?' + rsLower + '+' +
|
254
|
-
|
255
|
-
rsUpper + '?' +
|
256
|
-
rsUpper + '+' +
|
259
|
+
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
260
|
+
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
261
|
+
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
262
|
+
rsUpper + '+' + rsOptContrUpper,
|
263
|
+
rsOrdUpper,
|
264
|
+
rsOrdLower,
|
257
265
|
rsDigits,
|
258
266
|
rsEmoji
|
259
267
|
].join('|'), 'g');
|
@@ -496,7 +504,7 @@
|
|
496
504
|
*/
|
497
505
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
498
506
|
var index = -1,
|
499
|
-
length = array ? array.length
|
507
|
+
length = array == null ? 0 : array.length;
|
500
508
|
|
501
509
|
while (++index < length) {
|
502
510
|
var value = array[index];
|
@@ -516,7 +524,7 @@
|
|
516
524
|
*/
|
517
525
|
function arrayEach(array, iteratee) {
|
518
526
|
var index = -1,
|
519
|
-
length = array ? array.length
|
527
|
+
length = array == null ? 0 : array.length;
|
520
528
|
|
521
529
|
while (++index < length) {
|
522
530
|
if (iteratee(array[index], index, array) === false) {
|
@@ -536,7 +544,7 @@
|
|
536
544
|
* @returns {Array} Returns `array`.
|
537
545
|
*/
|
538
546
|
function arrayEachRight(array, iteratee) {
|
539
|
-
var length = array ? array.length
|
547
|
+
var length = array == null ? 0 : array.length;
|
540
548
|
|
541
549
|
while (length--) {
|
542
550
|
if (iteratee(array[length], length, array) === false) {
|
@@ -558,7 +566,7 @@
|
|
558
566
|
*/
|
559
567
|
function arrayEvery(array, predicate) {
|
560
568
|
var index = -1,
|
561
|
-
length = array ? array.length
|
569
|
+
length = array == null ? 0 : array.length;
|
562
570
|
|
563
571
|
while (++index < length) {
|
564
572
|
if (!predicate(array[index], index, array)) {
|
@@ -579,7 +587,7 @@
|
|
579
587
|
*/
|
580
588
|
function arrayFilter(array, predicate) {
|
581
589
|
var index = -1,
|
582
|
-
length = array ? array.length
|
590
|
+
length = array == null ? 0 : array.length,
|
583
591
|
resIndex = 0,
|
584
592
|
result = [];
|
585
593
|
|
@@ -602,7 +610,7 @@
|
|
602
610
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
603
611
|
*/
|
604
612
|
function arrayIncludes(array, value) {
|
605
|
-
var length = array ? array.length
|
613
|
+
var length = array == null ? 0 : array.length;
|
606
614
|
return !!length && baseIndexOf(array, value, 0) > -1;
|
607
615
|
}
|
608
616
|
|
@@ -617,7 +625,7 @@
|
|
617
625
|
*/
|
618
626
|
function arrayIncludesWith(array, value, comparator) {
|
619
627
|
var index = -1,
|
620
|
-
length = array ? array.length
|
628
|
+
length = array == null ? 0 : array.length;
|
621
629
|
|
622
630
|
while (++index < length) {
|
623
631
|
if (comparator(value, array[index])) {
|
@@ -638,7 +646,7 @@
|
|
638
646
|
*/
|
639
647
|
function arrayMap(array, iteratee) {
|
640
648
|
var index = -1,
|
641
|
-
length = array ? array.length
|
649
|
+
length = array == null ? 0 : array.length,
|
642
650
|
result = Array(length);
|
643
651
|
|
644
652
|
while (++index < length) {
|
@@ -680,7 +688,7 @@
|
|
680
688
|
*/
|
681
689
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
682
690
|
var index = -1,
|
683
|
-
length = array ? array.length
|
691
|
+
length = array == null ? 0 : array.length;
|
684
692
|
|
685
693
|
if (initAccum && length) {
|
686
694
|
accumulator = array[++index];
|
@@ -704,7 +712,7 @@
|
|
704
712
|
* @returns {*} Returns the accumulated value.
|
705
713
|
*/
|
706
714
|
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
707
|
-
var length = array ? array.length
|
715
|
+
var length = array == null ? 0 : array.length;
|
708
716
|
if (initAccum && length) {
|
709
717
|
accumulator = array[--length];
|
710
718
|
}
|
@@ -726,7 +734,7 @@
|
|
726
734
|
*/
|
727
735
|
function arraySome(array, predicate) {
|
728
736
|
var index = -1,
|
729
|
-
length = array ? array.length
|
737
|
+
length = array == null ? 0 : array.length;
|
730
738
|
|
731
739
|
while (++index < length) {
|
732
740
|
if (predicate(array[index], index, array)) {
|
@@ -870,7 +878,7 @@
|
|
870
878
|
* @returns {number} Returns the mean.
|
871
879
|
*/
|
872
880
|
function baseMean(array, iteratee) {
|
873
|
-
var length = array ? array.length
|
881
|
+
var length = array == null ? 0 : array.length;
|
874
882
|
return length ? (baseSum(array, iteratee) / length) : NAN;
|
875
883
|
}
|
876
884
|
|
@@ -1410,7 +1418,7 @@
|
|
1410
1418
|
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
|
1411
1419
|
*/
|
1412
1420
|
var runInContext = (function runInContext(context) {
|
1413
|
-
context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps))
|
1421
|
+
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
1414
1422
|
|
1415
1423
|
/** Built-in constructor references. */
|
1416
1424
|
var Array = context.Array,
|
@@ -1431,12 +1439,6 @@
|
|
1431
1439
|
/** Used to detect overreaching core-js shims. */
|
1432
1440
|
var coreJsData = context['__core-js_shared__'];
|
1433
1441
|
|
1434
|
-
/** Used to detect methods masquerading as native. */
|
1435
|
-
var maskSrcKey = (function() {
|
1436
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
1437
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
1438
|
-
}());
|
1439
|
-
|
1440
1442
|
/** Used to resolve the decompiled source of functions. */
|
1441
1443
|
var funcToString = funcProto.toString;
|
1442
1444
|
|
@@ -1446,15 +1448,21 @@
|
|
1446
1448
|
/** Used to generate unique IDs. */
|
1447
1449
|
var idCounter = 0;
|
1448
1450
|
|
1449
|
-
/** Used to
|
1450
|
-
var
|
1451
|
+
/** Used to detect methods masquerading as native. */
|
1452
|
+
var maskSrcKey = (function() {
|
1453
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
1454
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
1455
|
+
}());
|
1451
1456
|
|
1452
1457
|
/**
|
1453
1458
|
* Used to resolve the
|
1454
1459
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
1455
1460
|
* of values.
|
1456
1461
|
*/
|
1457
|
-
var
|
1462
|
+
var nativeObjectToString = objectProto.toString;
|
1463
|
+
|
1464
|
+
/** Used to infer the `Object` constructor. */
|
1465
|
+
var objectCtorString = funcToString.call(Object);
|
1458
1466
|
|
1459
1467
|
/** Used to restore the original `_` reference in `_.noConflict`. */
|
1460
1468
|
var oldDash = root._;
|
@@ -1471,11 +1479,12 @@
|
|
1471
1479
|
Uint8Array = context.Uint8Array,
|
1472
1480
|
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
|
1473
1481
|
getPrototype = overArg(Object.getPrototypeOf, Object),
|
1474
|
-
iteratorSymbol = Symbol ? Symbol.iterator : undefined,
|
1475
1482
|
objectCreate = Object.create,
|
1476
1483
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
1477
1484
|
splice = arrayProto.splice,
|
1478
|
-
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined
|
1485
|
+
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
|
1486
|
+
symIterator = Symbol ? Symbol.iterator : undefined,
|
1487
|
+
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
1479
1488
|
|
1480
1489
|
var defineProperty = (function() {
|
1481
1490
|
try {
|
@@ -1909,7 +1918,7 @@
|
|
1909
1918
|
*/
|
1910
1919
|
function Hash(entries) {
|
1911
1920
|
var index = -1,
|
1912
|
-
length = entries ? entries.length
|
1921
|
+
length = entries == null ? 0 : entries.length;
|
1913
1922
|
|
1914
1923
|
this.clear();
|
1915
1924
|
while (++index < length) {
|
@@ -2013,7 +2022,7 @@
|
|
2013
2022
|
*/
|
2014
2023
|
function ListCache(entries) {
|
2015
2024
|
var index = -1,
|
2016
|
-
length = entries ? entries.length
|
2025
|
+
length = entries == null ? 0 : entries.length;
|
2017
2026
|
|
2018
2027
|
this.clear();
|
2019
2028
|
while (++index < length) {
|
@@ -2130,7 +2139,7 @@
|
|
2130
2139
|
*/
|
2131
2140
|
function MapCache(entries) {
|
2132
2141
|
var index = -1,
|
2133
|
-
length = entries ? entries.length
|
2142
|
+
length = entries == null ? 0 : entries.length;
|
2134
2143
|
|
2135
2144
|
this.clear();
|
2136
2145
|
while (++index < length) {
|
@@ -2234,7 +2243,7 @@
|
|
2234
2243
|
*/
|
2235
2244
|
function SetCache(values) {
|
2236
2245
|
var index = -1,
|
2237
|
-
length = values ? values.length
|
2246
|
+
length = values == null ? 0 : values.length;
|
2238
2247
|
|
2239
2248
|
this.__data__ = new MapCache;
|
2240
2249
|
while (++index < length) {
|
@@ -2581,12 +2590,12 @@
|
|
2581
2590
|
*/
|
2582
2591
|
function baseAt(object, paths) {
|
2583
2592
|
var index = -1,
|
2584
|
-
isNil = object == null,
|
2585
2593
|
length = paths.length,
|
2586
|
-
result = Array(length)
|
2594
|
+
result = Array(length),
|
2595
|
+
skip = object == null;
|
2587
2596
|
|
2588
2597
|
while (++index < length) {
|
2589
|
-
result[index] =
|
2598
|
+
result[index] = skip ? undefined : get(object, paths[index]);
|
2590
2599
|
}
|
2591
2600
|
return result;
|
2592
2601
|
}
|
@@ -2776,7 +2785,7 @@
|
|
2776
2785
|
outer:
|
2777
2786
|
while (++index < length) {
|
2778
2787
|
var value = array[index],
|
2779
|
-
computed = iteratee ?
|
2788
|
+
computed = iteratee == null ? value : iteratee(value);
|
2780
2789
|
|
2781
2790
|
value = (comparator || value !== 0) ? value : 0;
|
2782
2791
|
if (isCommon && computed === computed) {
|
@@ -3043,14 +3052,20 @@
|
|
3043
3052
|
}
|
3044
3053
|
|
3045
3054
|
/**
|
3046
|
-
* The base implementation of `getTag
|
3055
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
3047
3056
|
*
|
3048
3057
|
* @private
|
3049
3058
|
* @param {*} value The value to query.
|
3050
3059
|
* @returns {string} Returns the `toStringTag`.
|
3051
3060
|
*/
|
3052
3061
|
function baseGetTag(value) {
|
3053
|
-
|
3062
|
+
if (value == null) {
|
3063
|
+
return value === undefined ? undefinedTag : nullTag;
|
3064
|
+
}
|
3065
|
+
value = Object(value);
|
3066
|
+
return (symToStringTag && symToStringTag in value)
|
3067
|
+
? getRawTag(value)
|
3068
|
+
: objectToString(value);
|
3054
3069
|
}
|
3055
3070
|
|
3056
3071
|
/**
|
@@ -3212,7 +3227,7 @@
|
|
3212
3227
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
3213
3228
|
*/
|
3214
3229
|
function baseIsArguments(value) {
|
3215
|
-
return isObjectLike(value) &&
|
3230
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
3216
3231
|
}
|
3217
3232
|
|
3218
3233
|
/**
|
@@ -3223,7 +3238,7 @@
|
|
3223
3238
|
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
|
3224
3239
|
*/
|
3225
3240
|
function baseIsArrayBuffer(value) {
|
3226
|
-
return isObjectLike(value) &&
|
3241
|
+
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
3227
3242
|
}
|
3228
3243
|
|
3229
3244
|
/**
|
@@ -3234,7 +3249,7 @@
|
|
3234
3249
|
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
|
3235
3250
|
*/
|
3236
3251
|
function baseIsDate(value) {
|
3237
|
-
return isObjectLike(value) &&
|
3252
|
+
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
3238
3253
|
}
|
3239
3254
|
|
3240
3255
|
/**
|
@@ -3416,7 +3431,7 @@
|
|
3416
3431
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
3417
3432
|
*/
|
3418
3433
|
function baseIsRegExp(value) {
|
3419
|
-
return
|
3434
|
+
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
3420
3435
|
}
|
3421
3436
|
|
3422
3437
|
/**
|
@@ -3439,7 +3454,7 @@
|
|
3439
3454
|
*/
|
3440
3455
|
function baseIsTypedArray(value) {
|
3441
3456
|
return isObjectLike(value) &&
|
3442
|
-
isLength(value.length) && !!typedArrayTags[
|
3457
|
+
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
3443
3458
|
}
|
3444
3459
|
|
3445
3460
|
/**
|
@@ -4100,7 +4115,7 @@
|
|
4100
4115
|
*/
|
4101
4116
|
function baseSortedIndex(array, value, retHighest) {
|
4102
4117
|
var low = 0,
|
4103
|
-
high = array ? array.length
|
4118
|
+
high = array == null ? low : array.length;
|
4104
4119
|
|
4105
4120
|
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
4106
4121
|
while (low < high) {
|
@@ -4136,7 +4151,7 @@
|
|
4136
4151
|
value = iteratee(value);
|
4137
4152
|
|
4138
4153
|
var low = 0,
|
4139
|
-
high = array ? array.length
|
4154
|
+
high = array == null ? 0 : array.length,
|
4140
4155
|
valIsNaN = value !== value,
|
4141
4156
|
valIsNull = value === null,
|
4142
4157
|
valIsSymbol = isSymbol(value),
|
@@ -4386,18 +4401,24 @@
|
|
4386
4401
|
* @returns {Array} Returns the new array of values.
|
4387
4402
|
*/
|
4388
4403
|
function baseXor(arrays, iteratee, comparator) {
|
4404
|
+
var length = arrays.length;
|
4405
|
+
if (length < 2) {
|
4406
|
+
return length ? baseUniq(arrays[0]) : [];
|
4407
|
+
}
|
4389
4408
|
var index = -1,
|
4390
|
-
|
4409
|
+
result = Array(length);
|
4391
4410
|
|
4392
4411
|
while (++index < length) {
|
4393
|
-
var
|
4394
|
-
|
4395
|
-
|
4396
|
-
|
4397
|
-
|
4398
|
-
|
4412
|
+
var array = arrays[index],
|
4413
|
+
othIndex = -1;
|
4414
|
+
|
4415
|
+
while (++othIndex < length) {
|
4416
|
+
if (othIndex != index) {
|
4417
|
+
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
|
4418
|
+
}
|
4419
|
+
}
|
4399
4420
|
}
|
4400
|
-
return (result
|
4421
|
+
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
|
4401
4422
|
}
|
4402
4423
|
|
4403
4424
|
/**
|
@@ -5934,6 +5955,33 @@
|
|
5934
5955
|
return baseIsNative(value) ? value : undefined;
|
5935
5956
|
}
|
5936
5957
|
|
5958
|
+
/**
|
5959
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
5960
|
+
*
|
5961
|
+
* @private
|
5962
|
+
* @param {*} value The value to query.
|
5963
|
+
* @returns {string} Returns the raw `toStringTag`.
|
5964
|
+
*/
|
5965
|
+
function getRawTag(value) {
|
5966
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
5967
|
+
tag = value[symToStringTag];
|
5968
|
+
|
5969
|
+
try {
|
5970
|
+
value[symToStringTag] = undefined;
|
5971
|
+
var unmasked = true;
|
5972
|
+
} catch (e) {}
|
5973
|
+
|
5974
|
+
var result = nativeObjectToString.call(value);
|
5975
|
+
if (unmasked) {
|
5976
|
+
if (isOwn) {
|
5977
|
+
value[symToStringTag] = tag;
|
5978
|
+
} else {
|
5979
|
+
delete value[symToStringTag];
|
5980
|
+
}
|
5981
|
+
}
|
5982
|
+
return result;
|
5983
|
+
}
|
5984
|
+
|
5937
5985
|
/**
|
5938
5986
|
* Creates an array of the own enumerable symbol properties of `object`.
|
5939
5987
|
*
|
@@ -5976,9 +6024,9 @@
|
|
5976
6024
|
(Set && getTag(new Set) != setTag) ||
|
5977
6025
|
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
5978
6026
|
getTag = function(value) {
|
5979
|
-
var result =
|
6027
|
+
var result = baseGetTag(value),
|
5980
6028
|
Ctor = result == objectTag ? value.constructor : undefined,
|
5981
|
-
ctorString = Ctor ? toSource(Ctor) :
|
6029
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
5982
6030
|
|
5983
6031
|
if (ctorString) {
|
5984
6032
|
switch (ctorString) {
|
@@ -6059,7 +6107,7 @@
|
|
6059
6107
|
if (result || ++index != length) {
|
6060
6108
|
return result;
|
6061
6109
|
}
|
6062
|
-
length = object ? object.length
|
6110
|
+
length = object == null ? 0 : object.length;
|
6063
6111
|
return !!length && isLength(length) && isIndex(key, length) &&
|
6064
6112
|
(isArray(object) || isArguments(object));
|
6065
6113
|
}
|
@@ -6470,6 +6518,17 @@
|
|
6470
6518
|
return result;
|
6471
6519
|
}
|
6472
6520
|
|
6521
|
+
/**
|
6522
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
6523
|
+
*
|
6524
|
+
* @private
|
6525
|
+
* @param {*} value The value to convert.
|
6526
|
+
* @returns {string} Returns the converted string.
|
6527
|
+
*/
|
6528
|
+
function objectToString(value) {
|
6529
|
+
return nativeObjectToString.call(value);
|
6530
|
+
}
|
6531
|
+
|
6473
6532
|
/**
|
6474
6533
|
* A specialized version of `baseRest` which transforms the rest array.
|
6475
6534
|
*
|
@@ -6680,7 +6739,7 @@
|
|
6680
6739
|
* Converts `func` to its source code.
|
6681
6740
|
*
|
6682
6741
|
* @private
|
6683
|
-
* @param {Function} func The function to
|
6742
|
+
* @param {Function} func The function to convert.
|
6684
6743
|
* @returns {string} Returns the source code.
|
6685
6744
|
*/
|
6686
6745
|
function toSource(func) {
|
@@ -6760,7 +6819,7 @@
|
|
6760
6819
|
} else {
|
6761
6820
|
size = nativeMax(toInteger(size), 0);
|
6762
6821
|
}
|
6763
|
-
var length = array ? array.length
|
6822
|
+
var length = array == null ? 0 : array.length;
|
6764
6823
|
if (!length || size < 1) {
|
6765
6824
|
return [];
|
6766
6825
|
}
|
@@ -6791,7 +6850,7 @@
|
|
6791
6850
|
*/
|
6792
6851
|
function compact(array) {
|
6793
6852
|
var index = -1,
|
6794
|
-
length = array ? array.length
|
6853
|
+
length = array == null ? 0 : array.length,
|
6795
6854
|
resIndex = 0,
|
6796
6855
|
result = [];
|
6797
6856
|
|
@@ -6963,7 +7022,7 @@
|
|
6963
7022
|
* // => [1, 2, 3]
|
6964
7023
|
*/
|
6965
7024
|
function drop(array, n, guard) {
|
6966
|
-
var length = array ? array.length
|
7025
|
+
var length = array == null ? 0 : array.length;
|
6967
7026
|
if (!length) {
|
6968
7027
|
return [];
|
6969
7028
|
}
|
@@ -6997,7 +7056,7 @@
|
|
6997
7056
|
* // => [1, 2, 3]
|
6998
7057
|
*/
|
6999
7058
|
function dropRight(array, n, guard) {
|
7000
|
-
var length = array ? array.length
|
7059
|
+
var length = array == null ? 0 : array.length;
|
7001
7060
|
if (!length) {
|
7002
7061
|
return [];
|
7003
7062
|
}
|
@@ -7057,8 +7116,7 @@
|
|
7057
7116
|
* @since 3.0.0
|
7058
7117
|
* @category Array
|
7059
7118
|
* @param {Array} array The array to query.
|
7060
|
-
* @param {Function} [predicate=_.identity]
|
7061
|
-
* The function invoked per iteration.
|
7119
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
7062
7120
|
* @returns {Array} Returns the slice of `array`.
|
7063
7121
|
* @example
|
7064
7122
|
*
|
@@ -7119,7 +7177,7 @@
|
|
7119
7177
|
* // => [4, '*', '*', 10]
|
7120
7178
|
*/
|
7121
7179
|
function fill(array, value, start, end) {
|
7122
|
-
var length = array ? array.length
|
7180
|
+
var length = array == null ? 0 : array.length;
|
7123
7181
|
if (!length) {
|
7124
7182
|
return [];
|
7125
7183
|
}
|
@@ -7139,8 +7197,7 @@
|
|
7139
7197
|
* @since 1.1.0
|
7140
7198
|
* @category Array
|
7141
7199
|
* @param {Array} array The array to inspect.
|
7142
|
-
* @param {Function} [predicate=_.identity]
|
7143
|
-
* The function invoked per iteration.
|
7200
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
7144
7201
|
* @param {number} [fromIndex=0] The index to search from.
|
7145
7202
|
* @returns {number} Returns the index of the found element, else `-1`.
|
7146
7203
|
* @example
|
@@ -7167,7 +7224,7 @@
|
|
7167
7224
|
* // => 2
|
7168
7225
|
*/
|
7169
7226
|
function findIndex(array, predicate, fromIndex) {
|
7170
|
-
var length = array ? array.length
|
7227
|
+
var length = array == null ? 0 : array.length;
|
7171
7228
|
if (!length) {
|
7172
7229
|
return -1;
|
7173
7230
|
}
|
@@ -7187,8 +7244,7 @@
|
|
7187
7244
|
* @since 2.0.0
|
7188
7245
|
* @category Array
|
7189
7246
|
* @param {Array} array The array to inspect.
|
7190
|
-
* @param {Function} [predicate=_.identity]
|
7191
|
-
* The function invoked per iteration.
|
7247
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
7192
7248
|
* @param {number} [fromIndex=array.length-1] The index to search from.
|
7193
7249
|
* @returns {number} Returns the index of the found element, else `-1`.
|
7194
7250
|
* @example
|
@@ -7215,7 +7271,7 @@
|
|
7215
7271
|
* // => 0
|
7216
7272
|
*/
|
7217
7273
|
function findLastIndex(array, predicate, fromIndex) {
|
7218
|
-
var length = array ? array.length
|
7274
|
+
var length = array == null ? 0 : array.length;
|
7219
7275
|
if (!length) {
|
7220
7276
|
return -1;
|
7221
7277
|
}
|
@@ -7244,7 +7300,7 @@
|
|
7244
7300
|
* // => [1, 2, [3, [4]], 5]
|
7245
7301
|
*/
|
7246
7302
|
function flatten(array) {
|
7247
|
-
var length = array ? array.length
|
7303
|
+
var length = array == null ? 0 : array.length;
|
7248
7304
|
return length ? baseFlatten(array, 1) : [];
|
7249
7305
|
}
|
7250
7306
|
|
@@ -7263,7 +7319,7 @@
|
|
7263
7319
|
* // => [1, 2, 3, 4, 5]
|
7264
7320
|
*/
|
7265
7321
|
function flattenDeep(array) {
|
7266
|
-
var length = array ? array.length
|
7322
|
+
var length = array == null ? 0 : array.length;
|
7267
7323
|
return length ? baseFlatten(array, INFINITY) : [];
|
7268
7324
|
}
|
7269
7325
|
|
@@ -7288,7 +7344,7 @@
|
|
7288
7344
|
* // => [1, 2, 3, [4], 5]
|
7289
7345
|
*/
|
7290
7346
|
function flattenDepth(array, depth) {
|
7291
|
-
var length = array ? array.length
|
7347
|
+
var length = array == null ? 0 : array.length;
|
7292
7348
|
if (!length) {
|
7293
7349
|
return [];
|
7294
7350
|
}
|
@@ -7313,7 +7369,7 @@
|
|
7313
7369
|
*/
|
7314
7370
|
function fromPairs(pairs) {
|
7315
7371
|
var index = -1,
|
7316
|
-
length = pairs ? pairs.length
|
7372
|
+
length = pairs == null ? 0 : pairs.length,
|
7317
7373
|
result = {};
|
7318
7374
|
|
7319
7375
|
while (++index < length) {
|
@@ -7369,7 +7425,7 @@
|
|
7369
7425
|
* // => 3
|
7370
7426
|
*/
|
7371
7427
|
function indexOf(array, value, fromIndex) {
|
7372
|
-
var length = array ? array.length
|
7428
|
+
var length = array == null ? 0 : array.length;
|
7373
7429
|
if (!length) {
|
7374
7430
|
return -1;
|
7375
7431
|
}
|
@@ -7395,7 +7451,7 @@
|
|
7395
7451
|
* // => [1, 2]
|
7396
7452
|
*/
|
7397
7453
|
function initial(array) {
|
7398
|
-
var length = array ? array.length
|
7454
|
+
var length = array == null ? 0 : array.length;
|
7399
7455
|
return length ? baseSlice(array, 0, -1) : [];
|
7400
7456
|
}
|
7401
7457
|
|
@@ -7485,9 +7541,8 @@
|
|
7485
7541
|
var comparator = last(arrays),
|
7486
7542
|
mapped = arrayMap(arrays, castArrayLikeObject);
|
7487
7543
|
|
7488
|
-
|
7489
|
-
|
7490
|
-
} else {
|
7544
|
+
comparator = typeof comparator == 'function' ? comparator : undefined;
|
7545
|
+
if (comparator) {
|
7491
7546
|
mapped.pop();
|
7492
7547
|
}
|
7493
7548
|
return (mapped.length && mapped[0] === arrays[0])
|
@@ -7511,7 +7566,7 @@
|
|
7511
7566
|
* // => 'a~b~c'
|
7512
7567
|
*/
|
7513
7568
|
function join(array, separator) {
|
7514
|
-
return array ? nativeJoin.call(array, separator)
|
7569
|
+
return array == null ? '' : nativeJoin.call(array, separator);
|
7515
7570
|
}
|
7516
7571
|
|
7517
7572
|
/**
|
@@ -7529,7 +7584,7 @@
|
|
7529
7584
|
* // => 3
|
7530
7585
|
*/
|
7531
7586
|
function last(array) {
|
7532
|
-
var length = array ? array.length
|
7587
|
+
var length = array == null ? 0 : array.length;
|
7533
7588
|
return length ? array[length - 1] : undefined;
|
7534
7589
|
}
|
7535
7590
|
|
@@ -7555,7 +7610,7 @@
|
|
7555
7610
|
* // => 1
|
7556
7611
|
*/
|
7557
7612
|
function lastIndexOf(array, value, fromIndex) {
|
7558
|
-
var length = array ? array.length
|
7613
|
+
var length = array == null ? 0 : array.length;
|
7559
7614
|
if (!length) {
|
7560
7615
|
return -1;
|
7561
7616
|
}
|
@@ -7658,8 +7713,7 @@
|
|
7658
7713
|
* @category Array
|
7659
7714
|
* @param {Array} array The array to modify.
|
7660
7715
|
* @param {Array} values The values to remove.
|
7661
|
-
* @param {Function} [iteratee=_.identity]
|
7662
|
-
* The iteratee invoked per element.
|
7716
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
7663
7717
|
* @returns {Array} Returns `array`.
|
7664
7718
|
* @example
|
7665
7719
|
*
|
@@ -7729,7 +7783,7 @@
|
|
7729
7783
|
* // => ['b', 'd']
|
7730
7784
|
*/
|
7731
7785
|
var pullAt = flatRest(function(array, indexes) {
|
7732
|
-
var length = array ? array.length
|
7786
|
+
var length = array == null ? 0 : array.length,
|
7733
7787
|
result = baseAt(array, indexes);
|
7734
7788
|
|
7735
7789
|
basePullAt(array, arrayMap(indexes, function(index) {
|
@@ -7752,8 +7806,7 @@
|
|
7752
7806
|
* @since 2.0.0
|
7753
7807
|
* @category Array
|
7754
7808
|
* @param {Array} array The array to modify.
|
7755
|
-
* @param {Function} [predicate=_.identity]
|
7756
|
-
* The function invoked per iteration.
|
7809
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
7757
7810
|
* @returns {Array} Returns the new array of removed elements.
|
7758
7811
|
* @example
|
7759
7812
|
*
|
@@ -7813,7 +7866,7 @@
|
|
7813
7866
|
* // => [3, 2, 1]
|
7814
7867
|
*/
|
7815
7868
|
function reverse(array) {
|
7816
|
-
return array ? nativeReverse.call(array)
|
7869
|
+
return array == null ? array : nativeReverse.call(array);
|
7817
7870
|
}
|
7818
7871
|
|
7819
7872
|
/**
|
@@ -7833,7 +7886,7 @@
|
|
7833
7886
|
* @returns {Array} Returns the slice of `array`.
|
7834
7887
|
*/
|
7835
7888
|
function slice(array, start, end) {
|
7836
|
-
var length = array ? array.length
|
7889
|
+
var length = array == null ? 0 : array.length;
|
7837
7890
|
if (!length) {
|
7838
7891
|
return [];
|
7839
7892
|
}
|
@@ -7880,8 +7933,7 @@
|
|
7880
7933
|
* @category Array
|
7881
7934
|
* @param {Array} array The sorted array to inspect.
|
7882
7935
|
* @param {*} value The value to evaluate.
|
7883
|
-
* @param {Function} [iteratee=_.identity]
|
7884
|
-
* The iteratee invoked per element.
|
7936
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
7885
7937
|
* @returns {number} Returns the index at which `value` should be inserted
|
7886
7938
|
* into `array`.
|
7887
7939
|
* @example
|
@@ -7916,7 +7968,7 @@
|
|
7916
7968
|
* // => 1
|
7917
7969
|
*/
|
7918
7970
|
function sortedIndexOf(array, value) {
|
7919
|
-
var length = array ? array.length
|
7971
|
+
var length = array == null ? 0 : array.length;
|
7920
7972
|
if (length) {
|
7921
7973
|
var index = baseSortedIndex(array, value);
|
7922
7974
|
if (index < length && eq(array[index], value)) {
|
@@ -7959,8 +8011,7 @@
|
|
7959
8011
|
* @category Array
|
7960
8012
|
* @param {Array} array The sorted array to inspect.
|
7961
8013
|
* @param {*} value The value to evaluate.
|
7962
|
-
* @param {Function} [iteratee=_.identity]
|
7963
|
-
* The iteratee invoked per element.
|
8014
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
7964
8015
|
* @returns {number} Returns the index at which `value` should be inserted
|
7965
8016
|
* into `array`.
|
7966
8017
|
* @example
|
@@ -7995,7 +8046,7 @@
|
|
7995
8046
|
* // => 3
|
7996
8047
|
*/
|
7997
8048
|
function sortedLastIndexOf(array, value) {
|
7998
|
-
var length = array ? array.length
|
8049
|
+
var length = array == null ? 0 : array.length;
|
7999
8050
|
if (length) {
|
8000
8051
|
var index = baseSortedIndex(array, value, true) - 1;
|
8001
8052
|
if (eq(array[index], value)) {
|
@@ -8063,7 +8114,7 @@
|
|
8063
8114
|
* // => [2, 3]
|
8064
8115
|
*/
|
8065
8116
|
function tail(array) {
|
8066
|
-
var length = array ? array.length
|
8117
|
+
var length = array == null ? 0 : array.length;
|
8067
8118
|
return length ? baseSlice(array, 1, length) : [];
|
8068
8119
|
}
|
8069
8120
|
|
@@ -8126,7 +8177,7 @@
|
|
8126
8177
|
* // => []
|
8127
8178
|
*/
|
8128
8179
|
function takeRight(array, n, guard) {
|
8129
|
-
var length = array ? array.length
|
8180
|
+
var length = array == null ? 0 : array.length;
|
8130
8181
|
if (!length) {
|
8131
8182
|
return [];
|
8132
8183
|
}
|
@@ -8145,8 +8196,7 @@
|
|
8145
8196
|
* @since 3.0.0
|
8146
8197
|
* @category Array
|
8147
8198
|
* @param {Array} array The array to query.
|
8148
|
-
* @param {Function} [predicate=_.identity]
|
8149
|
-
* The function invoked per iteration.
|
8199
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
8150
8200
|
* @returns {Array} Returns the slice of `array`.
|
8151
8201
|
* @example
|
8152
8202
|
*
|
@@ -8187,8 +8237,7 @@
|
|
8187
8237
|
* @since 3.0.0
|
8188
8238
|
* @category Array
|
8189
8239
|
* @param {Array} array The array to query.
|
8190
|
-
* @param {Function} [predicate=_.identity]
|
8191
|
-
* The function invoked per iteration.
|
8240
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
8192
8241
|
* @returns {Array} Returns the slice of `array`.
|
8193
8242
|
* @example
|
8194
8243
|
*
|
@@ -8251,8 +8300,7 @@
|
|
8251
8300
|
* @since 4.0.0
|
8252
8301
|
* @category Array
|
8253
8302
|
* @param {...Array} [arrays] The arrays to inspect.
|
8254
|
-
* @param {Function} [iteratee=_.identity]
|
8255
|
-
* The iteratee invoked per element.
|
8303
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
8256
8304
|
* @returns {Array} Returns the new array of combined values.
|
8257
8305
|
* @example
|
8258
8306
|
*
|
@@ -8294,9 +8342,7 @@
|
|
8294
8342
|
*/
|
8295
8343
|
var unionWith = baseRest(function(arrays) {
|
8296
8344
|
var comparator = last(arrays);
|
8297
|
-
|
8298
|
-
comparator = undefined;
|
8299
|
-
}
|
8345
|
+
comparator = typeof comparator == 'function' ? comparator : undefined;
|
8300
8346
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
|
8301
8347
|
});
|
8302
8348
|
|
@@ -8319,9 +8365,7 @@
|
|
8319
8365
|
* // => [2, 1]
|
8320
8366
|
*/
|
8321
8367
|
function uniq(array) {
|
8322
|
-
return (array && array.length)
|
8323
|
-
? baseUniq(array)
|
8324
|
-
: [];
|
8368
|
+
return (array && array.length) ? baseUniq(array) : [];
|
8325
8369
|
}
|
8326
8370
|
|
8327
8371
|
/**
|
@@ -8336,8 +8380,7 @@
|
|
8336
8380
|
* @since 4.0.0
|
8337
8381
|
* @category Array
|
8338
8382
|
* @param {Array} array The array to inspect.
|
8339
|
-
* @param {Function} [iteratee=_.identity]
|
8340
|
-
* The iteratee invoked per element.
|
8383
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
8341
8384
|
* @returns {Array} Returns the new duplicate free array.
|
8342
8385
|
* @example
|
8343
8386
|
*
|
@@ -8349,9 +8392,7 @@
|
|
8349
8392
|
* // => [{ 'x': 1 }, { 'x': 2 }]
|
8350
8393
|
*/
|
8351
8394
|
function uniqBy(array, iteratee) {
|
8352
|
-
return (array && array.length)
|
8353
|
-
? baseUniq(array, getIteratee(iteratee, 2))
|
8354
|
-
: [];
|
8395
|
+
return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
|
8355
8396
|
}
|
8356
8397
|
|
8357
8398
|
/**
|
@@ -8375,9 +8416,8 @@
|
|
8375
8416
|
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
|
8376
8417
|
*/
|
8377
8418
|
function uniqWith(array, comparator) {
|
8378
|
-
|
8379
|
-
|
8380
|
-
: [];
|
8419
|
+
comparator = typeof comparator == 'function' ? comparator : undefined;
|
8420
|
+
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
|
8381
8421
|
}
|
8382
8422
|
|
8383
8423
|
/**
|
@@ -8509,8 +8549,7 @@
|
|
8509
8549
|
* @since 4.0.0
|
8510
8550
|
* @category Array
|
8511
8551
|
* @param {...Array} [arrays] The arrays to inspect.
|
8512
|
-
* @param {Function} [iteratee=_.identity]
|
8513
|
-
* The iteratee invoked per element.
|
8552
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
8514
8553
|
* @returns {Array} Returns the new array of filtered values.
|
8515
8554
|
* @example
|
8516
8555
|
*
|
@@ -8552,9 +8591,7 @@
|
|
8552
8591
|
*/
|
8553
8592
|
var xorWith = baseRest(function(arrays) {
|
8554
8593
|
var comparator = last(arrays);
|
8555
|
-
|
8556
|
-
comparator = undefined;
|
8557
|
-
}
|
8594
|
+
comparator = typeof comparator == 'function' ? comparator : undefined;
|
8558
8595
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
8559
8596
|
});
|
8560
8597
|
|
@@ -8625,7 +8662,8 @@
|
|
8625
8662
|
* @since 3.8.0
|
8626
8663
|
* @category Array
|
8627
8664
|
* @param {...Array} [arrays] The arrays to process.
|
8628
|
-
* @param {Function} [iteratee=_.identity] The function to combine
|
8665
|
+
* @param {Function} [iteratee=_.identity] The function to combine
|
8666
|
+
* grouped values.
|
8629
8667
|
* @returns {Array} Returns the new array of grouped elements.
|
8630
8668
|
* @example
|
8631
8669
|
*
|
@@ -9002,8 +9040,7 @@
|
|
9002
9040
|
* @since 0.5.0
|
9003
9041
|
* @category Collection
|
9004
9042
|
* @param {Array|Object} collection The collection to iterate over.
|
9005
|
-
* @param {Function} [iteratee=_.identity]
|
9006
|
-
* The iteratee to transform keys.
|
9043
|
+
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
9007
9044
|
* @returns {Object} Returns the composed aggregate object.
|
9008
9045
|
* @example
|
9009
9046
|
*
|
@@ -9037,8 +9074,7 @@
|
|
9037
9074
|
* @since 0.1.0
|
9038
9075
|
* @category Collection
|
9039
9076
|
* @param {Array|Object} collection The collection to iterate over.
|
9040
|
-
* @param {Function} [predicate=_.identity]
|
9041
|
-
* The function invoked per iteration.
|
9077
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
9042
9078
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
9043
9079
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
9044
9080
|
* else `false`.
|
@@ -9084,8 +9120,7 @@
|
|
9084
9120
|
* @since 0.1.0
|
9085
9121
|
* @category Collection
|
9086
9122
|
* @param {Array|Object} collection The collection to iterate over.
|
9087
|
-
* @param {Function} [predicate=_.identity]
|
9088
|
-
* The function invoked per iteration.
|
9123
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
9089
9124
|
* @returns {Array} Returns the new filtered array.
|
9090
9125
|
* @see _.reject
|
9091
9126
|
* @example
|
@@ -9125,8 +9160,7 @@
|
|
9125
9160
|
* @since 0.1.0
|
9126
9161
|
* @category Collection
|
9127
9162
|
* @param {Array|Object} collection The collection to inspect.
|
9128
|
-
* @param {Function} [predicate=_.identity]
|
9129
|
-
* The function invoked per iteration.
|
9163
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
9130
9164
|
* @param {number} [fromIndex=0] The index to search from.
|
9131
9165
|
* @returns {*} Returns the matched element, else `undefined`.
|
9132
9166
|
* @example
|
@@ -9163,8 +9197,7 @@
|
|
9163
9197
|
* @since 2.0.0
|
9164
9198
|
* @category Collection
|
9165
9199
|
* @param {Array|Object} collection The collection to inspect.
|
9166
|
-
* @param {Function} [predicate=_.identity]
|
9167
|
-
* The function invoked per iteration.
|
9200
|
+
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
9168
9201
|
* @param {number} [fromIndex=collection.length-1] The index to search from.
|
9169
9202
|
* @returns {*} Returns the matched element, else `undefined`.
|
9170
9203
|
* @example
|
@@ -9186,8 +9219,7 @@
|
|
9186
9219
|
* @since 4.0.0
|
9187
9220
|
* @category Collection
|
9188
9221
|
* @param {Array|Object} collection The collection to iterate over.
|
9189
|
-
* @param {Function} [iteratee=_.identity]
|
9190
|
-
* The function invoked per iteration.
|
9222
|
+
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
9191
9223
|
* @returns {Array} Returns the new flattened array.
|
9192
9224
|
* @example
|
9193
9225
|
*
|
@@ -9211,8 +9243,7 @@
|
|
9211
9243
|
* @since 4.7.0
|
9212
9244
|
* @category Collection
|
9213
9245
|
* @param {Array|Object} collection The collection to iterate over.
|
9214
|
-
* @param {Function} [iteratee=_.identity]
|
9215
|
-
* The function invoked per iteration.
|
9246
|
+
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
9216
9247
|
* @returns {Array} Returns the new flattened array.
|
9217
9248
|
* @example
|
9218
9249
|
*
|
@@ -9236,8 +9267,7 @@
|
|
9236
9267
|
* @since 4.7.0
|
9237
9268
|
* @category Collection
|
9238
9269
|
* @param {Array|Object} collection The collection to iterate over.
|
9239
|
-
* @param {Function} [iteratee=_.identity]
|
9240
|
-
* The function invoked per iteration.
|
9270
|
+
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
9241
9271
|
* @param {number} [depth=1] The maximum recursion depth.
|
9242
9272
|
* @returns {Array} Returns the new flattened array.
|
9243
9273
|
* @example
|
@@ -9326,8 +9356,7 @@
|
|
9326
9356
|
* @since 0.1.0
|
9327
9357
|
* @category Collection
|
9328
9358
|
* @param {Array|Object} collection The collection to iterate over.
|
9329
|
-
* @param {Function} [iteratee=_.identity]
|
9330
|
-
* The iteratee to transform keys.
|
9359
|
+
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
9331
9360
|
* @returns {Object} Returns the composed aggregate object.
|
9332
9361
|
* @example
|
9333
9362
|
*
|
@@ -9436,8 +9465,7 @@
|
|
9436
9465
|
* @since 4.0.0
|
9437
9466
|
* @category Collection
|
9438
9467
|
* @param {Array|Object} collection The collection to iterate over.
|
9439
|
-
* @param {Function} [iteratee=_.identity]
|
9440
|
-
* The iteratee to transform keys.
|
9468
|
+
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
9441
9469
|
* @returns {Object} Returns the composed aggregate object.
|
9442
9470
|
* @example
|
9443
9471
|
*
|
@@ -10452,7 +10480,7 @@
|
|
10452
10480
|
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
10453
10481
|
* constructor with one whose instances implement the
|
10454
10482
|
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
10455
|
-
* method interface of `delete`, `get`, `has`, and `set`.
|
10483
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
10456
10484
|
*
|
10457
10485
|
* @static
|
10458
10486
|
* @memberOf _
|
@@ -10486,7 +10514,7 @@
|
|
10486
10514
|
* _.memoize.Cache = WeakMap;
|
10487
10515
|
*/
|
10488
10516
|
function memoize(func, resolver) {
|
10489
|
-
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
10517
|
+
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
10490
10518
|
throw new TypeError(FUNC_ERROR_TEXT);
|
10491
10519
|
}
|
10492
10520
|
var memoized = function() {
|
@@ -10902,8 +10930,7 @@
|
|
10902
10930
|
* // => '<p>fred, barney, & pebbles</p>'
|
10903
10931
|
*/
|
10904
10932
|
function wrap(value, wrapper) {
|
10905
|
-
|
10906
|
-
return partial(wrapper, value);
|
10933
|
+
return partial(castFunction(wrapper), value);
|
10907
10934
|
}
|
10908
10935
|
|
10909
10936
|
/*------------------------------------------------------------------------*/
|
@@ -11011,6 +11038,7 @@
|
|
11011
11038
|
* // => 0
|
11012
11039
|
*/
|
11013
11040
|
function cloneWith(value, customizer) {
|
11041
|
+
customizer = typeof customizer == 'function' ? customizer : undefined;
|
11014
11042
|
return baseClone(value, false, true, customizer);
|
11015
11043
|
}
|
11016
11044
|
|
@@ -11065,6 +11093,7 @@
|
|
11065
11093
|
* // => 20
|
11066
11094
|
*/
|
11067
11095
|
function cloneDeepWith(value, customizer) {
|
11096
|
+
customizer = typeof customizer == 'function' ? customizer : undefined;
|
11068
11097
|
return baseClone(value, true, true, customizer);
|
11069
11098
|
}
|
11070
11099
|
|
@@ -11328,7 +11357,7 @@
|
|
11328
11357
|
*/
|
11329
11358
|
function isBoolean(value) {
|
11330
11359
|
return value === true || value === false ||
|
11331
|
-
(isObjectLike(value) &&
|
11360
|
+
(isObjectLike(value) && baseGetTag(value) == boolTag);
|
11332
11361
|
}
|
11333
11362
|
|
11334
11363
|
/**
|
@@ -11387,7 +11416,7 @@
|
|
11387
11416
|
* // => false
|
11388
11417
|
*/
|
11389
11418
|
function isElement(value) {
|
11390
|
-
return value
|
11419
|
+
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
11391
11420
|
}
|
11392
11421
|
|
11393
11422
|
/**
|
@@ -11424,6 +11453,9 @@
|
|
11424
11453
|
* // => false
|
11425
11454
|
*/
|
11426
11455
|
function isEmpty(value) {
|
11456
|
+
if (value == null) {
|
11457
|
+
return true;
|
11458
|
+
}
|
11427
11459
|
if (isArrayLike(value) &&
|
11428
11460
|
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
11429
11461
|
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
@@ -11536,8 +11568,9 @@
|
|
11536
11568
|
if (!isObjectLike(value)) {
|
11537
11569
|
return false;
|
11538
11570
|
}
|
11539
|
-
|
11540
|
-
|
11571
|
+
var tag = baseGetTag(value);
|
11572
|
+
return tag == errorTag || tag == domExcTag ||
|
11573
|
+
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
|
11541
11574
|
}
|
11542
11575
|
|
11543
11576
|
/**
|
@@ -11588,10 +11621,13 @@
|
|
11588
11621
|
* // => false
|
11589
11622
|
*/
|
11590
11623
|
function isFunction(value) {
|
11624
|
+
if (!isObject(value)) {
|
11625
|
+
return false;
|
11626
|
+
}
|
11591
11627
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
11592
|
-
// in Safari 9 which returns 'object' for typed
|
11593
|
-
var tag =
|
11594
|
-
return tag == funcTag || tag == genTag || tag == proxyTag;
|
11628
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
11629
|
+
var tag = baseGetTag(value);
|
11630
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
11595
11631
|
}
|
11596
11632
|
|
11597
11633
|
/**
|
@@ -11942,7 +11978,7 @@
|
|
11942
11978
|
*/
|
11943
11979
|
function isNumber(value) {
|
11944
11980
|
return typeof value == 'number' ||
|
11945
|
-
(isObjectLike(value) &&
|
11981
|
+
(isObjectLike(value) && baseGetTag(value) == numberTag);
|
11946
11982
|
}
|
11947
11983
|
|
11948
11984
|
/**
|
@@ -11974,7 +12010,7 @@
|
|
11974
12010
|
* // => true
|
11975
12011
|
*/
|
11976
12012
|
function isPlainObject(value) {
|
11977
|
-
if (!isObjectLike(value) ||
|
12013
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
11978
12014
|
return false;
|
11979
12015
|
}
|
11980
12016
|
var proto = getPrototype(value);
|
@@ -11982,8 +12018,8 @@
|
|
11982
12018
|
return true;
|
11983
12019
|
}
|
11984
12020
|
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
11985
|
-
return
|
11986
|
-
|
12021
|
+
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
12022
|
+
funcToString.call(Ctor) == objectCtorString;
|
11987
12023
|
}
|
11988
12024
|
|
11989
12025
|
/**
|
@@ -12074,7 +12110,7 @@
|
|
12074
12110
|
*/
|
12075
12111
|
function isString(value) {
|
12076
12112
|
return typeof value == 'string' ||
|
12077
|
-
(!isArray(value) && isObjectLike(value) &&
|
12113
|
+
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
12078
12114
|
}
|
12079
12115
|
|
12080
12116
|
/**
|
@@ -12096,7 +12132,7 @@
|
|
12096
12132
|
*/
|
12097
12133
|
function isSymbol(value) {
|
12098
12134
|
return typeof value == 'symbol' ||
|
12099
|
-
(isObjectLike(value) &&
|
12135
|
+
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
12100
12136
|
}
|
12101
12137
|
|
12102
12138
|
/**
|
@@ -12178,7 +12214,7 @@
|
|
12178
12214
|
* // => false
|
12179
12215
|
*/
|
12180
12216
|
function isWeakSet(value) {
|
12181
|
-
return isObjectLike(value) &&
|
12217
|
+
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
12182
12218
|
}
|
12183
12219
|
|
12184
12220
|
/**
|
@@ -12263,8 +12299,8 @@
|
|
12263
12299
|
if (isArrayLike(value)) {
|
12264
12300
|
return isString(value) ? stringToArray(value) : copyArray(value);
|
12265
12301
|
}
|
12266
|
-
if (
|
12267
|
-
return iteratorToArray(value[
|
12302
|
+
if (symIterator && value[symIterator]) {
|
12303
|
+
return iteratorToArray(value[symIterator]());
|
12268
12304
|
}
|
12269
12305
|
var tag = getTag(value),
|
12270
12306
|
func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
@@ -12697,7 +12733,7 @@
|
|
12697
12733
|
*/
|
12698
12734
|
function create(prototype, properties) {
|
12699
12735
|
var result = baseCreate(prototype);
|
12700
|
-
return properties ? baseAssign(result, properties)
|
12736
|
+
return properties == null ? result : baseAssign(result, properties);
|
12701
12737
|
}
|
12702
12738
|
|
12703
12739
|
/**
|
@@ -13804,7 +13840,7 @@
|
|
13804
13840
|
* // => ['h', 'i']
|
13805
13841
|
*/
|
13806
13842
|
function values(object) {
|
13807
|
-
return object ? baseValues(object, keys(object))
|
13843
|
+
return object == null ? [] : baseValues(object, keys(object));
|
13808
13844
|
}
|
13809
13845
|
|
13810
13846
|
/**
|
@@ -15191,7 +15227,7 @@
|
|
15191
15227
|
* // => 'no match'
|
15192
15228
|
*/
|
15193
15229
|
function cond(pairs) {
|
15194
|
-
var length = pairs ? pairs.length
|
15230
|
+
var length = pairs == null ? 0 : pairs.length,
|
15195
15231
|
toIteratee = getIteratee();
|
15196
15232
|
|
15197
15233
|
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
@@ -16943,8 +16979,8 @@
|
|
16943
16979
|
// Add lazy aliases.
|
16944
16980
|
lodash.prototype.first = lodash.prototype.head;
|
16945
16981
|
|
16946
|
-
if (
|
16947
|
-
lodash.prototype[
|
16982
|
+
if (symIterator) {
|
16983
|
+
lodash.prototype[symIterator] = wrapperToIterator;
|
16948
16984
|
}
|
16949
16985
|
return lodash;
|
16950
16986
|
});
|