New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FP) invoke does not work with arguments #5753
Comments
May be need adjust the arguments position: var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
_.invoke(object, 'a[0].b.c.slice', 1, 3);
// => [2, 3] |
Even for the |
For FP( // Load the fp build.
var fp = require("lodash/fp");
var object = { a: [{ b: { c: [1, 2, 3, 4] } }] };
var ret = fp.invokeArgs("a[0].b.c.slice")([1, 3])(object);
console.log(ret);
// => [ 2, 3 ]
ret = fp.invokeArgs("a[0].b.c.slice", [1, 3], object);
console.log(ret);
// => [ 2, 3 ] More info see: FP Guide:
|
The example code returns
undefined
invoke
does work without arguments however..The text was updated successfully, but these errors were encountered: