You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Sindre Sorhus 9c14618060 Upgrade dependencies 7 years ago
docs Upgrade dependencies 7 years ago
media Add logo (#57) 7 years ago
source Upgrade dependencies 7 years ago
.editorconfig Init 7 years ago
.gitattributes Init 7 years ago
.gitignore Rewrite in TypeScript (#1) 7 years ago
.npmrc Init 7 years ago
.travis.yml Target Node.js 6 7 years ago
example.js Rewrite in TypeScript (#1) 7 years ago
license Init 7 years ago
package.json Upgrade dependencies 7 years ago
readme.md Fix typo 7 years ago
tsconfig.json Upgrade dependencies 7 years ago
tslint.json Upgrade dependencies 7 years ago
webpack.config.js Upgrade dependencies 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