power-validator
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

Power Validator

codecov

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

Function README
isString Return true if the input is ("typeof string != "string")
isStringNull Return true if the input is (null undefind "null")
isStringEmpty Return true if the input is (null undefind "" "null")
isStringValid Return false if the input is (null undefind "null" "typeof string != "string" "" )
isCapitalized Return true if the isStringValid && First Charcter is Capticalized

Number Validator

Function README
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

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

Address Validator

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

Quality Analysis by

Quality gate

Package Sidebar

Install

npm i power-validator

Weekly Downloads

1

Version

0.4.1

License

ISC

Unpacked Size

5.25 MB

Total Files

1085

Last publish

Collaborators

  • aravinthraja