@tspower/check
Advanced tools
Comparing version 1.2.2 to 1.2.3
/** | ||
* isEmpty | ||
* Return if value is undefined, null or empty | ||
* @param value value to test | ||
* @return true or false | ||
* @return true or false matching a regular expression in _regExpr module | ||
*/ | ||
export declare function isEmpty(value: any): boolean; | ||
/** | ||
* notEmpty | ||
* invert Empty function | ||
* @param value value to test | ||
* @return true or false | ||
* @return true or false matching a regular expression in _regExpr module | ||
*/ | ||
export declare function notEmpty(value: any): boolean; | ||
/** | ||
* isInteger | ||
* Return if value is an integer | ||
* @param value value to test | ||
@@ -20,3 +20,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isFloat | ||
* return if value is a float | ||
* @param value value to test | ||
@@ -27,3 +27,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isNegative | ||
* Return if value is negative | ||
* @param value value to test | ||
@@ -34,3 +34,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isItalianZipCode | ||
* Return if value is an Italian Zip Code | ||
* @param value value to test | ||
@@ -41,3 +41,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isEmail | ||
* return if value is an Email | ||
* @param value value to test | ||
@@ -48,3 +48,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isGenericPhoneNumber | ||
* return if value is a Generic Phone Number | ||
* @param value value to test | ||
@@ -55,3 +55,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
/** | ||
* isGenericPhoneNumber | ||
* return if value is an Italian Mobile Phone Number | ||
* @param value value to test | ||
@@ -58,0 +58,0 @@ * @return true or false matching a regular expression in _regExpr module |
@@ -9,5 +9,5 @@ "use strict"; | ||
/** | ||
* isEmpty | ||
* Return if value is undefined, null or empty | ||
* @param value value to test | ||
* @return true or false | ||
* @return true or false matching a regular expression in _regExpr module | ||
*/ | ||
@@ -21,5 +21,5 @@ function isEmpty(value) { | ||
/** | ||
* notEmpty | ||
* invert Empty function | ||
* @param value value to test | ||
* @return true or false | ||
* @return true or false matching a regular expression in _regExpr module | ||
*/ | ||
@@ -33,3 +33,3 @@ function notEmpty(value) { | ||
/** | ||
* isInteger | ||
* Return if value is an integer | ||
* @param value value to test | ||
@@ -42,5 +42,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.integer)) | ||
return true; | ||
return false; | ||
return regexpr_1.integer.test(value); | ||
} | ||
@@ -51,3 +49,3 @@ return false; | ||
/** | ||
* isFloat | ||
* return if value is a float | ||
* @param value value to test | ||
@@ -60,5 +58,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.float)) | ||
return true; | ||
return false; | ||
return regexpr_1.float.test(value); | ||
} | ||
@@ -69,3 +65,3 @@ return false; | ||
/** | ||
* isNegative | ||
* Return if value is negative | ||
* @param value value to test | ||
@@ -78,5 +74,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.negative)) | ||
return true; | ||
return false; | ||
return regexpr_1.negative.test(value); | ||
} | ||
@@ -87,3 +81,3 @@ return false; | ||
/** | ||
* isItalianZipCode | ||
* Return if value is an Italian Zip Code | ||
* @param value value to test | ||
@@ -96,5 +90,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.cap)) | ||
return true; | ||
return false; | ||
return regexpr_1.cap.test(value); | ||
} | ||
@@ -105,3 +97,3 @@ return false; | ||
/** | ||
* isEmail | ||
* return if value is an Email | ||
* @param value value to test | ||
@@ -114,5 +106,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.email)) | ||
return true; | ||
return false; | ||
return regexpr_1.email.test(value); | ||
} | ||
@@ -123,3 +113,3 @@ return false; | ||
/** | ||
* isGenericPhoneNumber | ||
* return if value is a Generic Phone Number | ||
* @param value value to test | ||
@@ -132,5 +122,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.genericPhoneNumber)) | ||
return true; | ||
return false; | ||
return regexpr_1.genericPhoneNumber.test(value); | ||
} | ||
@@ -141,3 +129,3 @@ return false; | ||
/** | ||
* isGenericPhoneNumber | ||
* return if value is an Italian Mobile Phone Number | ||
* @param value value to test | ||
@@ -150,5 +138,3 @@ * @return true or false matching a regular expression in _regExpr module | ||
value = value.toString(); | ||
if (value.match(regexpr_1.italianMobilePhone)) | ||
return true; | ||
return false; | ||
return regexpr_1.italianMobilePhone.test(value); | ||
} | ||
@@ -155,0 +141,0 @@ return false; |
{ | ||
"name": "@tspower/check", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Simple Collection of checks functions", | ||
@@ -23,3 +23,3 @@ "main": "./lib/check.js", | ||
"test": "npm run test-only", | ||
"typedoc": "typedoc --out ./docs --mode modules --tsconfig ./tsconfig.json " | ||
"typedoc": "typedoc --out ./docs --mode file --tsconfig ./tsconfig.json " | ||
}, | ||
@@ -26,0 +26,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ # Check ![alt text](https://ppbusinessproject.visualstudio.com/TSPowerOne/_apis/build/status/TsPowerOne.Check?branchName=master) | ||
## Methods Available | ||
## Available Methods | ||
1 - isEmpty(value: any): boolean; | ||
@@ -19,2 +19,6 @@ 2 - notEmpty(value: any): boolean; | ||
## Documentation | ||
Detailed documentation [here](https://tspowerone.github.io/Check/) | ||
## Install | ||
@@ -21,0 +25,0 @@ `npm i @tspower/check` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8493
35
181