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
·
sindresorhus avatar

sindresorhus/ow

0
View on GitHub↗
3,868 stars·110 forks·TypeScript·MIT·8 viewssindresorhus.com/ow↗

Ow

ow is a type-safe schema validation library for TypeScript that verifies data integrity at runtime. It functions as a runtime validation framework and type guard utility, ensuring that JavaScript values match expected types and schemas before they are processed.

The library synchronizes runtime data checks with static TypeScript type definitions, allowing users to extract type definitions directly from validation predicates. This integration enables type narrowing, where a successful validation result refines the variable type for safer usage in the code.

The framework uses a chainable API to build verification logic for function arguments and object shapes. It supports the composition of complex predicates using logical operators, the definition of reusable validators, and the customization of error messages. Support is included for validating primitives, built-in objects, and typed arrays.

Features

  • Runtime Schema Validations - Verifies that JavaScript values match expected TypeScript types and schemas during runtime execution.
  • Predicate Composers - Combines multiple validation rules using logical operators to create sophisticated constraints for data.
  • Runtime Validation Libraries - Provides runtime data verification combined with automatic TypeScript type inference.
  • Type Narrowing - Tests values against predicates to refine the TypeScript type upon a successful match.
  • Type Narrowing Assertion - Refines TypeScript types by linking runtime validation success to static type guards for safer variable usage.
  • Type Validation - Provides runtime checking to ensure values match specific types, including primitives and built-in objects.
  • Data Schema Enforcement - Enforces complex rules and requirements for objects and primitives to catch malformed information early in the application flow.
  • Object Shape Validation - Enforces specific property requirements and types on objects while supporting partial updates.
  • Type-Safe Schema Validators - Synchronizes runtime data checks with static TypeScript type definitions to ensure type safety during validation.
  • Function Argument Validation - Verifies that inputs passed to functions meet specific type constraints and requirements at runtime.
  • Logical Predicate Composition - Combines individual validation functions using logical operators to create sophisticated requirements for complex data structures.
  • Chainable Validation APIs - Uses a chainable API to build complex validation logic through incrementally refined method calls.
  • Single Value Validators - Verifies that a single value matches a specific predicate and triggers an error upon failure.
  • Schema Type Inference - Automatically extracts TypeScript type definitions from runtime predicates to ensure consistency without duplicating code.
  • Runtime Type Guards - Provides runtime boolean checks that automatically narrow TypeScript types upon a successful match.
  • Build-Time Code Stripping - Implements environment-aware markers to strip validation logic from production bundles to reduce final application size.
  • Predicate Combinations - Allows combining several constraints to require a minimum number of matches or invert the result of a rule.
  • Predicate Match Verification - Returns a boolean indicating whether a value satisfies a predicate without triggering an exception.
  • Fluent Validation APIs - Uses a chainable, fluent API to build complex verification logic for function arguments and object shapes.
  • Custom Validation Functions - Executes custom synchronous or asynchronous validation logic with support for specific error messages.
  • Function Registries - Provides a registry mechanism to map identifiers to reusable standalone validation functions.
  • Composable Validation Frameworks - Implements a framework for creating reusable, composable predicates and custom error messages for complex data verification.
  • Explicit Nullable Validators - Allows specifying whether values can be undefined or null without triggering validation errors.
  • Validation Error Customizations - Provides mechanisms for overriding default error messages with specific text or dynamic functions.
  • Reusable Validators - Enables the definition of reusable validation rules with custom labels to maintain consistency across projects.
  • Runtime Validation - Human-readable function argument validation.

Star history

Star history chart for sindresorhus/owStar history chart for sindresorhus/ow

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 Ow

Similar open-source projects, ranked by how many features they share with Ow.
  • samchon/typiasamchon avatar

    samchon/typia

    5,837View on GitHub↗

    Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution. The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It

    Go
    View on GitHub↗5,837
  • yiminghe/async-validatoryiminghe avatar

    yiminghe/async-validator

    9,099View on GitHub↗

    async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex object structures and nested arrays by applying recursive rules and non-blocking, promise-based execution to ensure data integrity. The library functions as both an object constraint validator and a data transformation pipeline. It allows for the sanitization, coercion, and formatting of input values through a sequence of functions that run before and after the primary validation process. The engine covers a range of capabilities including recursive nested validation, the en

    TypeScript
    View on GitHub↗9,099
  • meteor-community-packages/meteor-simple-schemaMeteor-Community-Packages avatar

    Meteor-Community-Packages/meteor-simple-schema

    915View on GitHub↗

    This library provides a comprehensive system for defining data schemas and enforcing structural integrity within JavaScript applications. It enables developers to construct declarative rules for complex, nested objects, ensuring that data conforms to expected types and constraints before it is processed or stored. By integrating directly with the Meteor framework, it serves as a central tool for maintaining consistent data structures across collections and remote procedure calls. The project distinguishes itself through its deep integration with reactive data systems, allowing validation stat

    JavaScriptcleaning-dataform-generationform-validation
    View on GitHub↗915
  • asaskevich/govalidatorasaskevich avatar

    asaskevich/govalidator

    6,203View on GitHub↗

    Go Package of validators and sanitizers for strings, numerics, slices and structs

    Gogogovalidatorsanitization
    View on GitHub↗6,203
See all 30 alternatives to Ow→

Frequently asked questions

What does sindresorhus/ow do?

ow is a type-safe schema validation library for TypeScript that verifies data integrity at runtime. It functions as a runtime validation framework and type guard utility, ensuring that JavaScript values match expected types and schemas before they are processed.

What are the main features of sindresorhus/ow?

The main features of sindresorhus/ow are: Runtime Schema Validations, Predicate Composers, Runtime Validation Libraries, Type Narrowing, Type Narrowing Assertion, Type Validation, Data Schema Enforcement, Object Shape Validation.

What are some open-source alternatives to sindresorhus/ow?

Open-source alternatives to sindresorhus/ow include: samchon/typia — Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation,… yiminghe/async-validator — async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex… meteor-community-packages/meteor-simple-schema — This library provides a comprehensive system for defining data schemas and enforcing structural integrity within… asaskevich/govalidator — [Go] Package of validators and sanitizers for strings, numerics, slices and structs. json-schema-form/angular-schema-form — Angular schema form is a framework directive and form component library that automatically generates and validates… php-standard-library/php-standard-library — The php-standard-library is a comprehensive toolkit for functional programming and asynchronous networking in PHP,…