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
{{ message }}
This repository was archived by the owner on Jun 6, 2021. It is now read-only.
It's understandable if the declaration of types is sometimes quite tricky, so making use of predefined checks from the module itself would be quite handy. But the choice is to either include it with the root export or create a new file which the dependant can import themselves...
This issue is intended for a first time contributor.
If you want to contribute by adding any of these methods, please do not feel pressured to adding all of them at once. I would appreciate it if you gave others the opportunity. ❤️
And if you do add one or more, you may reference it but please do not use the fix or closes keywords. I will handle that on my own accord.
Copied from the README.md located on dev branch at the time of writing.
It's understandable if the declaration of types is sometimes quite tricky, so making use of predefined checks from the module itself would be quite handy. But the choice is to either include it with the root export or create a new file which the dependant can import themselves...
Copied from the README.md located on dev branch at the time of writing.
validate.checks[key: string](value?: any) => booleanvalidate.checks.exists(value?: any) => booleanvalidate.checks.optional(value?: any) => boolean- Possiblity to moveoptions.optionalto this predicate...validate.checks.truthy(value?: any) => booleanvalidate.checks.int(value: int?) => booleanType bound
This would make use of predicate construction by passing the context of the previous scope through to the child.
validate.checks.min<T>(n: T) => (value: T?) => booleanvalidate.checks.max<T>(n: T) => (value: T?) => booleanvalidate.checks.between<T>(low: T, high: T) => (value: T?) => boolean