kungfu-validatorjs
v1.0.3
Published
Validator Javascript base on prototype
Downloads
1
Readme
Kungfu ValidatorJs
Validator Javascript base on prototype
Installation
npm install kungfu-validatorjs
How To Use
const is = require('kungfu-validatorjs')
is(15, 'number') // true
is('hello', 'string') // true
const number = 15
number.isGreaterThan(20) // false
number.isLessThan(20) // true
number.inRange(5, 20) // true
number.isIn([5,10,15,20]) // true
const string = '[email protected]'
string.isEmail() // true
string.isAlpha() // false
string.inLength(10, 100) // true
Or You can import it
import is from 'kungfu-validatorjs'
How To Contribute
Clone this project
git clone https://gitlab.com/kungfukoding/kungfu-validatorjs.git
cd kungfu-validatorjs
npm install
npm test