1.0.1 • Published 6 years ago
check-please v1.0.1
check-please
Simple, composable validation
Table of Contents
Install
This project uses node and npm.
$ npm install check-please
$ # OR
$ yarn add check-please
Usage
import {check, exists, pattern, exact, str} from './src'
const isValidFoo = check(
exact('foo'),
pattern(/foo/),
exists('Email is required'),
str('Email should be string')
)
console.log(isValidFoo('foo').valid) // true
Docs
See docs here.
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT