|
|
|
@ -9800,7 +9800,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
})( window );/** |
|
|
|
|
* @license |
|
|
|
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
|
|
|
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop"` |
|
|
|
|
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy"` |
|
|
|
|
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|
|
|
|
* Released under MIT license <https://lodash.com/license>
|
|
|
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
|
|
@ -10092,6 +10092,27 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
return func.apply(thisArg, args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* A specialized version of `baseAggregator` for arrays. |
|
|
|
|
* |
|
|
|
|
* @private |
|
|
|
|
* @param {Array} [array] The array to iterate over. |
|
|
|
|
* @param {Function} setter The function to set `accumulator` values. |
|
|
|
|
* @param {Function} iteratee The iteratee to transform keys. |
|
|
|
|
* @param {Object} accumulator The initial aggregated object. |
|
|
|
|
* @returns {Function} Returns `accumulator`. |
|
|
|
|
*/ |
|
|
|
|
function arrayAggregator(array, setter, iteratee, accumulator) { |
|
|
|
|
var index = -1, |
|
|
|
|
length = array == null ? 0 : array.length; |
|
|
|
|
|
|
|
|
|
while (++index < length) { |
|
|
|
|
var value = array[index]; |
|
|
|
|
setter(accumulator, value, iteratee(value), array); |
|
|
|
|
} |
|
|
|
|
return accumulator; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* A specialized version of `_.forEach` for arrays without support for |
|
|
|
|
* iteratee shorthands. |
|
|
|
@ -11675,6 +11696,24 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Aggregates elements of `collection` on `accumulator` with keys transformed |
|
|
|
|
* by `iteratee` and values set by `setter`. |
|
|
|
|
* |
|
|
|
|
* @private |
|
|
|
|
* @param {Array|Object} collection The collection to iterate over. |
|
|
|
|
* @param {Function} setter The function to set `accumulator` values. |
|
|
|
|
* @param {Function} iteratee The iteratee to transform keys. |
|
|
|
|
* @param {Object} accumulator The initial aggregated object. |
|
|
|
|
* @returns {Function} Returns `accumulator`. |
|
|
|
|
*/ |
|
|
|
|
function baseAggregator(collection, setter, iteratee, accumulator) { |
|
|
|
|
baseEach(collection, function(value, key, collection) { |
|
|
|
|
setter(accumulator, value, iteratee(value), collection); |
|
|
|
|
}); |
|
|
|
|
return accumulator; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* The base implementation of `_.assign` without support for multiple sources |
|
|
|
|
* or `customizer` functions. |
|
|
|
@ -13274,6 +13313,23 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
return copyObject(source, getSymbolsIn(source), object); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Creates a function like `_.groupBy`. |
|
|
|
|
* |
|
|
|
|
* @private |
|
|
|
|
* @param {Function} setter The function to set accumulator values. |
|
|
|
|
* @param {Function} [initializer] The accumulator object initializer. |
|
|
|
|
* @returns {Function} Returns the new aggregator function. |
|
|
|
|
*/ |
|
|
|
|
function createAggregator(setter, initializer) { |
|
|
|
|
return function(collection, iteratee) { |
|
|
|
|
var func = isArray(collection) ? arrayAggregator : baseAggregator, |
|
|
|
|
accumulator = initializer ? initializer() : {}; |
|
|
|
|
|
|
|
|
|
return func(collection, setter, baseIteratee(iteratee, 2), accumulator); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Creates a function like `_.assign`. |
|
|
|
|
* |
|
|
|
@ -15746,6 +15802,36 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Creates an object composed of keys generated from the results of running |
|
|
|
|
* each element of `collection` thru `iteratee`. The corresponding value of |
|
|
|
|
* each key is the number of times the key was returned by `iteratee`. The |
|
|
|
|
* iteratee is invoked with one argument: (value). |
|
|
|
|
* |
|
|
|
|
* @static |
|
|
|
|
* @memberOf _ |
|
|
|
|
* @since 0.5.0 |
|
|
|
|
* @category Collection |
|
|
|
|
* @param {Array|Object} collection The collection to iterate over. |
|
|
|
|
* @param {Function} [iteratee=_.identity] The iteratee to transform keys. |
|
|
|
|
* @returns {Object} Returns the composed aggregate object. |
|
|
|
|
* @example |
|
|
|
|
* |
|
|
|
|
* _.countBy([6.1, 4.2, 6.3], Math.floor); |
|
|
|
|
* // => { '4': 1, '6': 2 }
|
|
|
|
|
* |
|
|
|
|
* // The `_.property` iteratee shorthand.
|
|
|
|
|
* _.countBy(['one', 'two', 'three'], 'length'); |
|
|
|
|
* // => { '3': 2, '5': 1 }
|
|
|
|
|
*/ |
|
|
|
|
var countBy = createAggregator(function(result, value, key) { |
|
|
|
|
if (hasOwnProperty.call(result, key)) { |
|
|
|
|
++result[key]; |
|
|
|
|
} else { |
|
|
|
|
baseAssignValue(result, key, 1); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Checks if `predicate` returns truthy for **all** elements of `collection`. |
|
|
|
|
* Iteration is stopped once `predicate` returns falsey. The predicate is |
|
|
|
@ -18772,6 +18858,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
lodash.chain = chain; |
|
|
|
|
lodash.compact = compact; |
|
|
|
|
lodash.concat = concat; |
|
|
|
|
lodash.countBy = countBy; |
|
|
|
|
lodash.create = create; |
|
|
|
|
lodash.debounce = debounce; |
|
|
|
|
lodash.defaults = defaults; |
|
|
|
|