The opposite of method this method creates a function that invokes the method at a given path of object. Any additional arguments are provided to the invoked method.
method
object
5.12.0
const array = times(3, i => () => i)const object = { 'a': array, 'b': array, 'c': array }map(['a[2]', 'c[0]'], methodOf(object))// => [2, 0]map([['a', '2'], ['c', '0']], methodOf(object))// => [2, 0] Copy
const array = times(3, i => () => i)const object = { 'a': array, 'b': array, 'c': array }map(['a[2]', 'c[0]'], methodOf(object))// => [2, 0]map([['a', '2'], ['c', '0']], methodOf(object))// => [2, 0]
The object to query.
Rest
The arguments to invoke the method with.
Returns the new invoker function.
The opposite of
method
this method creates a function that invokes the method at a given path ofobject
. Any additional arguments are provided to the invoked method.Since
5.12.0
Example