mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 03:03:37 +08:00
FIX: wrong file used when updating lodash (#7564)
This commit is contained in:
parent
87c2cbe062
commit
fd1ae16f3b
7853
lodash.custom.js
7853
lodash.custom.js
File diff suppressed because it is too large
Load Diff
50
vendor/assets/javascripts/lodash.js
vendored
50
vendor/assets/javascripts/lodash.js
vendored
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @license
|
||||
* Lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash include="each,filter,map,range,first,isEmpty,chain,extend,every,omit,merge,union,sortBy,uniq,intersection,reject,compact,reduce,debounce,throttle,values,pick,keys,flatten,min,max,isArray,delay,isString,isEqual,without,invoke,clone" minus="template" -d`
|
||||
* Build: `lodash include="each,filter,map,range,first,isEmpty,chain,extend,every,omit,merge,union,sortBy,uniq,intersection,reject,compact,reduce,debounce,throttle,values,pick,keys,flatten,min,max,isArray,delay,isString,isEqual,without,invoke,clone,findIndex" minus="template" -d`
|
||||
* 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>
|
||||
|
@ -4852,6 +4852,53 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like `_.find` except that it returns the index of the first
|
||||
* element `predicate` returns truthy for instead of the element itself.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 1.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {number} [fromIndex=0] The index to search from.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* { 'user': 'barney', 'active': false },
|
||||
* { 'user': 'fred', 'active': false },
|
||||
* { 'user': 'pebbles', 'active': true }
|
||||
* ];
|
||||
*
|
||||
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
||||
* // => 0
|
||||
*
|
||||
* // The `_.matches` iteratee shorthand.
|
||||
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
||||
* // => 1
|
||||
*
|
||||
* // The `_.matchesProperty` iteratee shorthand.
|
||||
* _.findIndex(users, ['active', false]);
|
||||
* // => 0
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.findIndex(users, 'active');
|
||||
* // => 2
|
||||
*/
|
||||
function findIndex(array, predicate, fromIndex) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
if (!length) {
|
||||
return -1;
|
||||
}
|
||||
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
||||
if (index < 0) {
|
||||
index = nativeMax(length + index, 0);
|
||||
}
|
||||
return baseFindIndex(array, getIteratee(predicate, 3), index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens `array` a single level deep.
|
||||
*
|
||||
|
@ -7504,6 +7551,7 @@
|
|||
lodash.clone = clone;
|
||||
lodash.eq = eq;
|
||||
lodash.every = every;
|
||||
lodash.findIndex = findIndex;
|
||||
lodash.forEach = forEach;
|
||||
lodash.get = get;
|
||||
lodash.hasIn = hasIn;
|
||||
|
|
Loading…
Reference in New Issue
Block a user