0.4.1 • Published 5 years ago

power-validator v0.4.1

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Power Validator

codecov npm.io npm.io

Quality Gate Status Bugs Maintainability Rating

Security Rating Vulnerabilities

Build Status

Power Validator Javascript

Power Validator is a lightweight all in one library for the validation and respective utils which we use in the everyday project/product development.

Our Mission is to bring in all the possible validation functions and helper utils into to one place

Getting Started

We Support Node ES6 Modules, plain javascript, typescript. AMD modules

Install using npm

   $ npm install power-validator
   const PowerValidator = require("power-validator");

   let status = PowerValidator.isString("Power Validator");

   console.log(status);

Install for browser

you can check our cdn source for the latest version ro you can download form the Github release

    https://cdn.jsdelivr.net/npm/power-validator/dist/power-validator.min.js
   <script src = "https://cdn.jsdelivr.net/npm/power-validator/dist/power-validator.min.js" >

   <script type = "text/javascript">

     var name   = "Power Validator";

    console.log( PowerValidator.isString(name));  'true'


     var number   = 100;

    console.log( PowerValidator.isString(number));  'false'

   </script>

Currently Supported functions (latest build)

Our Validation functions are currently classifed into following type

* String Validator - function's to validate string 
* Number Validator - function's to validate numbes, floats etc 
* Array Validator  - function's to validate array.

String Validator

FunctionREADME
isStringReturn true if the input is ("typeof string != "string")
isStringNullReturn true if the input is (null undefind "null")
isStringEmptyReturn true if the input is (null undefind "" "null")
isStringValidReturn false if the input is (null undefind "null" "typeof string != "string" "" )
isCapitalizedReturn true if the isStringValid && First Charcter is Capticalized

Number Validator

FunctionREADME
isNumber(input)Return true if the input is ("typeof input != "string")
isZero(input)Return true if the input is zero
isPostiveNumber(input)Return true if the input is zero or greater than zero
isNegativeNumber(input)Return true if the input less than zero

Array Validator

FunctionREADME
isArray(input)Return true if the input is ("typeof input != "array")
isArrayEmpty(input)Return true if the input array empty

Address Validator

FunctionREADME
isEmailAddress(input)Return true if the input is valid email (works on the mordern email)

Quality Analysis by

Quality gate

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.0-beta

5 years ago

0.0.3

5 years ago