In the web project include pp-is.js with:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/pp-is.min.js" ></script>Or
npm i pp-is --saveChecks if value is classified as an Array object.
Checks if value is either true or false.
Checks if value is a Date
Checks if value is a DOM element.
Checks if value is a Function.
Checks if value is a Null.
Checks if value is a Null or Undefined
Checks if value is a Number.
Checks if value is classified as an Object.
Checks if value is a string.
Checks if value is a undefined.
Checks if value is a valid email.
Checks if value is a valid Number from String.
Checks if value is a RegExp.
Checks if value is a valid Url.
Checks if value is a valid NodeList.
Checks if value is a valid HTMLCollection.
Verify that a value is not empty, in the case of a string that is not “” , in the case of an array that is not [] and an object that is not {}.
Check that a value is blank, which is when a string is not empty but filled with blank spaces.
Checks if value is classified as an Promise object.
var value = "string...";
if( ppIs.isString(value) ){
// Enter your code here
}// You can make an extra evaluation
const done = ( value ) => {
return value !== 'string';
}
const reject = ( value ) => {
}
const value = 'string';
const result = ppIs.isString( value , done , reject );
if( result ){
}else{
}