Kevin Martensson 811238c49c Fix typo 7 years ago
docs Add documentation generator (#29) 7 years ago
media Add logo (#57) 7 years ago
source Add `any` predicate (#56) 7 years ago
.editorconfig Init 8 years ago
.gitattributes Init 8 years ago
.gitignore Rewrite in TypeScript (#1) 8 years ago
.npmrc Init 8 years ago
.travis.yml Target Node.js 6 7 years ago
example.js Rewrite in TypeScript (#1) 8 years ago
license Init 8 years ago
package.json Support dot properties in object hasKeys and hasAnyKeys - fixes #50 (#52) 7 years ago
readme.md Fix typo 7 years ago
tsconfig.json Bump TypeScript 7 years ago
tslint.json Upgrade `tslint-xo` (#23) 7 years ago
webpack.config.js Simplify module.exports webpack config (#37) 7 years ago

readme.md



Build Status

Argument type validation

Install

$ npm install ow

Docs

Usage

const ow = require('ow');

const unicorn = input => {
	ow(input, ow.string.minLength(5));

	
);

unicorn(3);
//=> ArgumentError: Expected argument to be of type `string` but received type `number`

unicorn('yo');
//=> ArgumentError: Expected string length to be minimum 5

Maintainers

Logo is based on Comic Book Elements by Carl Eriksson.

License

MIT