Runtime Object Shape Testing and Type Definition
JSON →object-shape-tester is a TypeScript-first utility library designed to define, validate, and provide default values for JavaScript objects at both compile-time (via TypeScript types) and runtime. The library's current stable version is 6.11.0, with minor and patch releases occurring frequently, indicating active maintenance and development. Its core differentiator lies in generating TypeScript types, runtime validation logic, and default object values from a single, concise shape definition, reducing redundancy and ensuring consistency across an application. It supports complex type definitions through specifiers like `unionShape`, `intersectShape`, and `enumShape`, and can even integrate with `@sinclair/typebox` schemas for advanced use cases. This approach ensures that objects conform to expected structures throughout their lifecycle, suitable for both testing environments and production data processing, especially in Node.js applications (requiring Node.js >=22).
Traffic · last 30 days ↑67% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany