FindSoftware

ow

TypeScript library for runtime validation of function arguments, with chainable predicates and readable error messages.

ow checks the arguments of a function at runtime and throws an ArgumentError with a message when a value does not match. Checks are written as chained predicates, such as ow.string.minLength, and TypeScript type guards narrow the checked value afterwards.

The package installs from npm and runs in Node.js, where the name of a checked value is inferred from the source. In the browser that inference does not work.

Worth knowing

For complex schema validation, such as API responses or parsed JSON, the README points to zod instead. A dev-only import, ow/dev-only, exports a shim in production builds, which lowers the bundle size.

Identity

Status
Active
Maintainer
Sindre Sorhus3
Maintained by
Individual
First release
20166

Rendering and deploy

Install with
npm2

Releases

Current major version
35
Last release
2025-10-165

Adoption

GitHub stars
3,8651
npm downloads a week
2,637,7528
Contributors
347
Dependent repositories
46,9619
Dependent packages
4809

Why these figures do not compare

Sources

  1. 2026-11-16: links, Written in, License, GitHub stars
    api.github.com/repos/sindresorhus/ow
  2. 2026-11-16: links, Categories, Runtime, Install with
    raw.githubusercontent.com/sindresorhus/ow/main/readme.md
  3. 2026-11-16: Maintainer, License model
    raw.githubusercontent.com/sindresorhus/ow/main/license
  4. 2026-11-16: Minimum runtime
    raw.githubusercontent.com/sindresorhus/ow/v3.1.1/package.json
  5. 2026-11-16: Current major version, Last release
    api.github.com/repos/sindresorhus/ow/releases/latest
  6. 2026-11-16: First release
    registry.npmjs.org/ow
  7. 2026-11-16: Contributors
    api.github.com/repos/sindresorhus/ow/contributors?per_page=1
  8. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-01:2026-11-07/ow
  9. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/ow

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON