typeforce - Runtime Type Checking
JSON →Typeforce is a JavaScript library designed for biased runtime type checking, offering a comprehensive suite of utilities to enforce data structures and primitive types. As of version 1.18.0, it provides a flexible API for defining complex type schemas, including support for arrays, recursive objects, optional properties (`?`), sum types (`anyOf`), and intersection types (`allOf`). A notable feature is its extensibility through custom type functions, allowing developers to define domain-specific validations. It differentiates itself by offering specialized modules for non-throwing error handling (`typeforce/nothrow`) and asynchronous validation (`typeforce/async`), catering to different error management strategies. While a specific release cadence isn't detailed, its versioning suggests ongoing maintenance and feature development, making it a robust choice for projects requiring strict data validation without relying on static type systems.
Traffic · last 30 days ↓40% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France