Could there be a ow.mandatory that throws by using it as default arg?
function getPage(identifier = ow.mandatory()) {
ow(identifier, ow.string);
}
ArgumentError: Expected a mandatory argument but received `undefined` or missing
Reference: 16. Mandatory Parameter Shorthand
mandatory = () => {
throw new Error('Missing parameter!');
}
foo = (bar = mandatory()) => {
return bar;
}
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