mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Rename _.invoke to _.invokeMap.
This commit is contained in:
42
lodash.js
42
lodash.js
@@ -1495,7 +1495,7 @@
|
||||
* `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`,
|
||||
* `flowRight`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
|
||||
* `forOwnRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`,
|
||||
* `intersection`, `intersectionBy`, `intersectionWith`, invert`, `invoke`,
|
||||
* `intersection`, `intersectionBy`, `intersectionWith`, invert`, `invokeMap`,
|
||||
* `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`,
|
||||
* `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`,
|
||||
* `methodOf`, `mixin`, `modArgs`, `modArgsSet', `negate`, `nthArg`, `omit`,
|
||||
@@ -1517,20 +1517,20 @@
|
||||
* `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
|
||||
* `findLast`, `findLastIndex`, `findLastKey`, `floor`, `get`, `gt`, `gte`,
|
||||
* `has`, `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`,
|
||||
* `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
|
||||
* `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
|
||||
* `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,
|
||||
* `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,
|
||||
* `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,
|
||||
* `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,
|
||||
* `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,
|
||||
* `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
|
||||
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
|
||||
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
|
||||
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
|
||||
* `startsWith`, `subtract`, `sum`, sumBy`, `template`, `times`, `toLower`,
|
||||
* `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, toString`, `toUpper`,
|
||||
* `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
|
||||
* `invokePath`, `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`,
|
||||
* `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
|
||||
* `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`,
|
||||
* `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
|
||||
* `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
|
||||
* `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, `last`,
|
||||
* `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`,
|
||||
* `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, `padEnd`,
|
||||
* `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`,
|
||||
* `result`, `round`, `runInContext`, `sample`, `shift`, `size`, `snakeCase`,
|
||||
* `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`,
|
||||
* `startCase`, `startsWith`, `subtract`, `sum`, sumBy`, `template`, `times`,
|
||||
* `toLower`, `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, toString`,
|
||||
* `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,
|
||||
* `upperCase`, `upperFirst`, `value`, and `words`
|
||||
*
|
||||
* @name _
|
||||
@@ -7485,13 +7485,13 @@
|
||||
* @returns {Array} Returns the array of results.
|
||||
* @example
|
||||
*
|
||||
* _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
|
||||
* _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
|
||||
* // => [[1, 5, 7], [1, 2, 3]]
|
||||
*
|
||||
* _.invoke([123, 456], String.prototype.split, '');
|
||||
* _.invokeMap([123, 456], String.prototype.split, '');
|
||||
* // => [['1', '2', '3'], ['4', '5', '6']]
|
||||
*/
|
||||
var invoke = rest(function(collection, path, args) {
|
||||
var invokeMap = rest(function(collection, path, args) {
|
||||
var index = -1,
|
||||
isFunc = typeof path == 'function',
|
||||
isProp = isKey(path),
|
||||
@@ -12925,7 +12925,7 @@
|
||||
* _.map(objects, _.method('a.b.c'));
|
||||
* // => [2, 1]
|
||||
*
|
||||
* _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
|
||||
* _.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
|
||||
* // => [1, 2]
|
||||
*/
|
||||
var method = rest(function(path, args) {
|
||||
@@ -13725,8 +13725,7 @@
|
||||
lodash.intersectionBy = intersectionBy;
|
||||
lodash.intersectionWith = intersectionWith;
|
||||
lodash.invert = invert;
|
||||
lodash.invoke = invoke;
|
||||
lodash.invokePath = invokePath;
|
||||
lodash.invokeMap = invokeMap;
|
||||
lodash.iteratee = iteratee;
|
||||
lodash.keyBy = keyBy;
|
||||
lodash.keys = keys;
|
||||
@@ -13866,6 +13865,7 @@
|
||||
lodash.includes = includes;
|
||||
lodash.indexOf = indexOf;
|
||||
lodash.inRange = inRange;
|
||||
lodash.invokePath = invokePath;
|
||||
lodash.isArguments = isArguments;
|
||||
lodash.isArray = isArray;
|
||||
lodash.isArrayLike = isArrayLike;
|
||||
|
||||
Reference in New Issue
Block a user