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 6d22d3d932 Fix null test title 7 years ago
source Fix null test title 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 dependencies 7 years ago
readme.md Tiny readme tweak 7 years ago
todo.md Make `ow` a default export 7 years ago
tsconfig.json Target Node.js 6 7 years ago
tslint.json Upgrade `tslint-xo` (#23) 7 years ago
webpack.config.js Bump dependencies 7 years ago

readme.md

ow Build Status

Argument type validation

Install

$ npm install ow

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