You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
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.
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?
The text was updated successfully, but these errors were encountered: