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 b330b58e8d Add number validator (#10) 7 years ago
source Add number validator (#10) 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 Rewrite in TypeScript (#1) 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 Add number validator (#10) 7 years ago
readme.md Add @SamVerschueren to the readme 7 years ago
todo.md Init 7 years ago
tsconfig.json Add linting rules - fixes #7 (#8) 7 years ago
tslint.json Add linting rules - fixes #7 (#8) 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

Created by

License

MIT