I would like to be able to use Ow directly in conditionals:
if (ow(options.foo, ow.boolean)) {
}
The above doesn't work as Ow doesn't return a boolean when the validation passes.
We have ow.isValid()
, but it only returns a boolean. I need it to return true
when it passes and throw an error when it doesn't.
Alternatives considered: Having Ow accept a callback that is only executed when the condition passes. However, I would prefer using an if-statement if possible.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too