# ow

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


Source: https://findsoftware.frbit.cloud/ow/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://sindresorhus.com/ow/
- repository: https://github.com/sindresorhus/ow
- docs: https://sindresorhus.com/ow/

### Identity

- status: active
- maintainer: Sindre Sorhus
- maintainerType: individual
- parent: unknown
- firstRelease: 2016
- hqCountry: unknown

### Kind

- category: library
- hosting: node
- language: javascript
- runtime: node
- runtimeMin: node 20
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: npm

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 3
- latestReleaseDate: 2025-10-16

### Adoption

- githubStargazers: 3865
- packagistDownloads: not applicable
- npmWeeklyDownloads: 2637752
- contributors: 34
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 46961
- dependentPackages: 480

### Sources

- urls: https://api.github.com/repos/sindresorhus/ow (read 2026-11-16)
- urls: https://api.github.com/repos/sindresorhus/ow (read 2026-11-16)
- urls: https://raw.githubusercontent.com/sindresorhus/ow/main/readme.md (read 2026-11-16)
- maintainer: https://raw.githubusercontent.com/sindresorhus/ow/main/license (read 2026-11-16)
- language: https://api.github.com/repos/sindresorhus/ow (read 2026-11-16)
- category: https://raw.githubusercontent.com/sindresorhus/ow/main/readme.md (read 2026-11-16)
- runtime: https://raw.githubusercontent.com/sindresorhus/ow/main/readme.md (read 2026-11-16)
- runtimeMin: https://raw.githubusercontent.com/sindresorhus/ow/v3.1.1/package.json (read 2026-11-16)
- installMethod: https://raw.githubusercontent.com/sindresorhus/ow/main/readme.md (read 2026-11-16)
- license: https://api.github.com/repos/sindresorhus/ow (read 2026-11-16)
- licenseModel: https://raw.githubusercontent.com/sindresorhus/ow/main/license (read 2026-11-16)
- currentMajor: https://api.github.com/repos/sindresorhus/ow/releases/latest (read 2026-11-16)
- latestReleaseDate: https://api.github.com/repos/sindresorhus/ow/releases/latest (read 2026-11-16)
- firstRelease: https://registry.npmjs.org/ow (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/sindresorhus/ow (read 2026-11-16)
- contributors: https://api.github.com/repos/sindresorhus/ow/contributors?per_page=1 (read 2026-11-16)
- npmWeeklyDownloads: https://api.npmjs.org/downloads/range/2026-11-01:2026-11-07/ow (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/ow (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/ow (read 2026-11-16)

## Notes

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.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
