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.

55 lines
894 B

7 years ago
<p align="center">
<img src="media/logo.png" width="300">
<br>
<br>
</p>
7 years ago
7 years ago
[![Build Status](https://travis-ci.org/sindresorhus/ow.svg?branch=master)](https://travis-ci.org/sindresorhus/ow)
7 years ago
7 years ago
> Argument type validation
7 years ago
## Install
```
$ npm install ow
```
## [Docs](https://sindresorhus.com/ow/interfaces/ow.html)
7 years ago
## Usage
```js
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');
7 years ago
//=> ArgumentError: Expected string length to be minimum 5
7 years ago
```
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Sam Verschueren](https://github.com/SamVerschueren)
7 years ago
## Logo
Logo is based on [Comic Book Elements](https://creativemarket.com/swedishpoints/232087-Comic-Book-Elements) by Carl Eriksson.
7 years ago
## License
MIT