awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
ianstormtaylor avatar

ianstormtaylor/superstruct

0
View on GitHub↗
7,141 stars·221 forks·TypeScript·MIT·6 viewsdocs.superstructjs.org↗

Superstruct

Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions.

The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures.

Its capabilities cover the validation of complex types such as unions, intersections, tuples, and dictionaries, alongside the ability to define custom validators and apply specific refinements to base data types. The system also provides automatic type inference to derive static types from schemas, removing the need for manual type casting.

Features

  • Data Type Validation - Ensures data conforms to expected structures by checking that values match specific types and schema definitions at runtime.
  • Schema Validation - A comprehensive system for verifying data structures against predefined composable schemas.
  • Data Type Coercion - Provides a data coercion engine to transform input values into target types before final validation.
  • Data Validation Libraries - Provides a comprehensive library for parsing, validating, and enforcing data structures against predefined schemas in JavaScript and TypeScript.
  • Composable Schema Builders - Offers a set of tools for creating intricate validation rules by nesting, merging, or omitting properties from existing structures.
  • Structural Data Validators - Evaluates and validates incoming data against defined structural requirements and custom types.
  • Data Schema Definitions - Provides structures for defining complex, nested data models and validation rules via composable primitives.
  • Schema Composition - Enables building complex validators by picking, omitting, or merging properties from existing structural definitions.
  • Recursive Validation Engines - Implements a system that handles nested data structures by recursively dispatching validation logic across hierarchies.
  • Schema Composition Libraries - Provides a functional approach to building complex validation structures by nesting and chaining reusable schema primitives.
  • Schema-Driven Type Inference - Automatically derives static TypeScript type definitions from runtime schema configurations to keep them synchronized.
  • Schema Type Inference - Automatically maps runtime schema definitions to static TypeScript types for automated type safety.
  • Type-Safe Schema Validations - Synchronizes runtime data checks with static TypeScript type definitions to ensure end-to-end type safety.
  • Schema-Driven Input Mutators - Transforms raw input data and injects defaults to ensure the input meets required schema formats.
  • Value Transformations - Provides custom functions that modify data values or apply defaults during the casting process before validation.
  • Property Strictness - Implements rules that ensure objects contain only specified keys by filtering or stripping extras.
  • Custom Validators - Provides the mechanism for creating specialized validation rules for types not covered by standard primitives.
  • Value Type Conversions - Transforms data from one primitive or complex type to another during the validation pipeline.
  • Data Transformation Pipelines - Implements utilities for processing and converting raw input data through multi-stage transformation and validation workflows.
  • Schema Default Values - Injects fallback values into fields when input data is undefined or missing during validation.
  • Predicate Refinements - Allows extending base type checks with custom predicate functions to enforce specific value ranges or formats.
  • Request Validation - Provides utilities for validating incoming HTTP request data before it is processed by the backend.
  • Schema Validation Refinements - Allows for the application of custom validation logic and specialized constraints, such as numeric ranges, to base data types.
  • Validator Composition - Enables the creation of complex validation rules by wrapping existing validators for unions or intersections.
  • Data Validation - Simple and composable data validation.
  • Runtime Validation - Composable data validation library.
  • Data Validation - Composable data validation for JS and TS.

Star history

Star history chart for ianstormtaylor/superstructStar history chart for ianstormtaylor/superstruct

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Superstruct

Similar open-source projects, ranked by how many features they share with Superstruct.
  • open-circle/valibotopen-circle avatar

    open-circle/valibot

    8,769View on GitHub↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    TypeScriptbundle-sizemodularparsing
    View on GitHub↗8,769
  • jquense/yupjquense avatar

    jquense/yup

    23,673View on GitHub↗

    Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def

    TypeScript
    View on GitHub↗23,673
  • hapijs/joihapijs avatar

    hapijs/joi

    21,192View on GitHub↗

    Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application. The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the

    JavaScripthapijavascriptschema
    View on GitHub↗21,192
  • colinhacks/zodcolinhacks avatar

    colinhacks/zod

    43,036View on GitHub↗

    Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It functions as a runtime type guard, allowing developers to define complex data structures through a declarative, chainable syntax. By using these schema definitions, the library automatically derives static TypeScript types, eliminating the need for manual type duplication and ensuring that runtime data matches expected application contracts. The library distinguishes itself through functional schema composition, which enables the creation of hierarchical structures by nesting a

    TypeScriptruntime-validationschema-validationstatic-types
    View on GitHub↗43,036
See all 30 alternatives to Superstruct→

Frequently asked questions

What does ianstormtaylor/superstruct do?

Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions.

What are the main features of ianstormtaylor/superstruct?

The main features of ianstormtaylor/superstruct are: Data Type Validation, Schema Validation, Data Type Coercion, Data Validation Libraries, Composable Schema Builders, Structural Data Validators, Data Schema Definitions, Schema Composition.

What are some open-source alternatives to ianstormtaylor/superstruct?

Open-source alternatives to ianstormtaylor/superstruct include: open-circle/valibot — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments. jquense/yup — Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as… hapijs/joi — Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It… colinhacks/zod — Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It… sideway/joi — Joi is a JavaScript data validation library used to define schemas that ensure the structure and data types of objects… elysiajs/elysia — Elysia is a high-performance TypeScript web framework designed for building type-safe backend services. It provides a…