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.
 
 
Sam Verschueren 3b570b41df Add object predicate (#48) 7 years ago
docs Add documentation generator (#29) 7 years ago
source Add object predicate (#48) 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
header.gif Init 7 years ago
license Init 7 years ago
package.json Bump TypeScript 7 years ago
readme.md Add documentation generator (#29) 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

ow 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 10

Maintainers

License

MIT