1.0.2 • Published 8 years ago
bobjs v1.0.2
How to install
npm install bobjs
How to use
let bobJS = require('bobJS');
// basic Examples
bobJS("Gynidark").equals("Gynidark").errors;
// verification of the email
bobJS("gynidark@gmail.com").isEmail().errors;
// type checking
bobJS(5).isType("number").errors;
// chained Examples
bobJS(5).equalsIgnoreCase("five").isType("string").errors;
Validations
// if my fields is empty
isEmpty()
// if two values are equal
equals(any)
// if two values are equal if case is ignored
equalsIgnoreCase(any)
// if type of two values are same
isType(string)
// if the regexp is good
isEmail()
// minimum character
minLength(number)
// maximum character
maxLength(number)
// minimum value
minValue(number)
// maximum character
maxValue(number)
// if uppercase
isUpper()
// if lowercase
isLower()
// if alphabet
isAlpha()
// if alphanumeric
isAlphanumeric()
License
Released under the MIT License. See the bundled LICENSE file for details.