pp-is

Collection of methods for check

Usage no npm install needed!

<script type="module">
  import ppIs from 'https://cdn.skypack.dev/pp-is';
</script>

README

pp-is

Getting Started

In the web project include pp-is.js with:

<script src="https://cdn.jsdelivr.net/npm/pp-is@latest/pp-is.min.js" ></script>

Or

Install

npm i pp-is --save

Methods

isArray

Checks if value is classified as an Array object.


isBoolean

Checks if value is either true or false.


isDate

Checks if value is a Date


isElement

Checks if value is a DOM element.


isFunction

Checks if value is a Function.


isNull

Checks if value is a Null.


isNumber

Checks if value is a Number.


isObject

Checks if value is classified as an Object.


isString

Checks if value is a string.


isUndefined

Checks if value is a undefined.


isEmail

Checks if value is a valid email.



isNaN

Checks if value is a valid Number from String.



isRegExp

Checks if value is a RegExp.



isUrl

Checks if value is a valid Url.


How to use ?


var value = "string...";

if( ppIs.isString(value) ){
  // Enter your code here
}

or


var value = "string...";

ppIs.isString( value , function( val ){
    // Enter your code here
})