superstruct

v2.0.2 MIT

A simple and composable way to validate data in JavaScript (and TypeScript).

Weekly Downloads
3.7M
Stars
7.2K
Forks
221
Open Issues
98
Gzip Size
3.5 kB
Unpacked Size
182.3 kB
Dependencies
1

Download Trends

Download trends for superstruct03.4M6.8M10.2M13.6MFeb 25May 25Aug 25Nov 25Feb 26
superstruct

AI Insights

superstruct is a lightweight library designed to validate data in JavaScript and TypeScript through a simple and composable API. Developers use it to enforce data integrity and ensure types are adhered to in their applications.

When to use

  • When you need to validate user input before processing it.
  • If you want to ensure data structures conform to specific schemas.
  • To enhance TypeScript development with runtime type checks.

When NOT to use

  • If your application does not require data validation.
  • When dealing with performance-critical paths where validation overhead is a concern.
  • If you prefer a more opinionated validation framework with built-in functionalities.

Alternatives

Categories