Ow
Function argument validation for humans
Ow is a TypeScript-based JavaScript library for validating function arguments and other runtime values with expressive predicates. It complements static TypeScript checking by catching invalid data that reaches an application after compilation. Developers can validate strings, numbers, objects, arrays, and many other values through a readable chainable API. Built-in predicates cover common constraints, while custom validators can handle application-specific requirements. Failed checks produce descriptive errors intended to make debugging easier than relying on later runtime failures. Ow can also test values without throwing and includes TypeScript type guards that narrow unknown values after successful validation. ...