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
- Host: GitHub
- URL: https://github.com/aleclarson/assertvalid
- Owner: aleclarson
- License: mit
- Created: 2017-09-02T20:35:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T16:57:31.000Z (over 7 years ago)
- Last Synced: 2025-01-18T02:44:03.533Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.