An open API service indexing awesome lists of open source software.

https://github.com/aleclarson/assertvalid

Simple yet powerful assertion
https://github.com/aleclarson/assertvalid

Last synced: 11 months ago
JSON representation

Simple yet powerful assertion

Awesome Lists containing this project

README

          

# assertValid v1.0.1

```js
const assertValid = require('assertValid');

const value = 0;
assertValid(value, 'string') // => TypeError('Expected a string')
assertValid(value, 'number') // => undefined
```

See the [valido](https://github.com/aleclarson/valido) documentation to learn more.