mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Remove remaining rest helper use.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import baseInvoke from './_baseInvoke.js';
|
||||
import baseRest from './_baseRest.js';
|
||||
|
||||
/**
|
||||
* The opposite of `_.method`; this method creates a function that invokes
|
||||
@@ -24,6 +23,8 @@ import baseRest from './_baseRest.js';
|
||||
* _.map([['a', '2'], ['c', '0']], _.methodOf(object));
|
||||
* // => [2, 0]
|
||||
*/
|
||||
const methodOf = baseRest((object, args) => path => baseInvoke(object, path, args));
|
||||
function methodOf(object, ...args) {
|
||||
return path => baseInvoke(object, path, args);
|
||||
}
|
||||
|
||||
export default methodOf;
|
||||
|
||||
Reference in New Issue
Block a user