A curated drawer of JavaScript validation, schema, and runtime type-checking libraries worth reachingĀ for.
Schema validation
Define a schema once, then validate and infer types fromĀ it.
| Resource | Why it is useful |
|---|
| superstruct | Composable, tiny schema validation with great error messages. |
| typed | Minimal schema validation with TypeScript inference. |
| runtypes | Runtime validation that derives static types; examples linked. |
| ts-to-zod | Generate Zod schemas from existing TypeScript types. |
| valid-types | Lightweight, simple validation; single-file source. |
Runtime type checking and assertions
| Resource | Why it is useful |
|---|
| ow | Expressive argument-validation / assertion library for function inputs. |
| Resource | Why it is useful |
|---|
| validator.js | Battle-tested string validators and sanitizers (email, URL, etc.). |
| node-input-validator | Rule-string validation, e.g. name\|required\|min:5. |
JSON Schema
| Resource | Why it is useful |
|---|
| ajv | Fast JSON Schema validator, the de facto standard. |