Runtime Object Shape Testing and Type Definition

JSON →
library 6.11.0 ·javascript
verified May 27, 2026

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).

total hits 15
actors 7 distinct systems
last hit 6d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany