Open brianjmiller opened 6 years ago
We were using the ability to look up into a deep object structure knowing that the leaf might be a function
The current functionality; while "cute" is not so helpful for your particular use-case; thought it did fit my use-case perfectly at the time I implemented it.
... but we need the ability to pass arguments to the invocation of that function.
Bad news: This is currently impossible as implemented.
Good news: I'm going to drop the automatic function invocation in v2.
If you want this now, you might consider: https://lodash.com/docs#invoke
Would this ever be considered as an option or should we look at an alternative module? Have I just missed something obvious in the 1.x interface?
See ☝️
Thanks for the reply, no worries. We've since switched to Hoek.reach
we were already using Joi anyways, and it works for our simple use case. Thanks for selectn
I'll keep it mind for the future.
@brianjmiller Please check this Repo for returning functions as not executed one.
Was finally looking to upgrade dependencies in an existing project from 0.9.6 (I know, I'm sorry) to latest, and it seems there is no way to return a function as a value. We were using the ability to look up into a deep object structure knowing that the leaf might be a function, but we need the ability to pass arguments to the invocation of that function. Would this ever be considered as an option or should we look at an alternative module? Have I just missed something obvious in the 1.x interface?