Comparing version 0.1.9 to 0.1.10
export declare class Validator { | ||
private reInt; | ||
private reDecimal; | ||
private reString; | ||
private reAlphanumeric; | ||
@@ -25,13 +24,12 @@ private reDate; | ||
isTime(value: any): boolean; | ||
isBooleanFormat(value: any): boolean; | ||
isNumberFormat(value: any): boolean; | ||
isIntegerFormat(value: any): boolean; | ||
isDecimalFormat(value: any): boolean; | ||
isStringFormat(value: any): boolean; | ||
isAlphanumeric(value: any): boolean; | ||
isDateFormat(value: any): boolean; | ||
isDateTimeFormat(value: any): boolean; | ||
isTimeFormat(value: any): boolean; | ||
isBooleanFormat(value: string): boolean; | ||
isNumberFormat(value: string): boolean; | ||
isIntegerFormat(value: string): boolean; | ||
isDecimalFormat(value: string): boolean; | ||
isAlphanumeric(value: string): boolean; | ||
isDateFormat(value: string): boolean; | ||
isDateTimeFormat(value: string): boolean; | ||
isTimeFormat(value: string): boolean; | ||
between(value: any, from: any, to: any): boolean; | ||
includes(list: any[] | string, value: any): boolean; | ||
} |
@@ -8,4 +8,2 @@ "use strict"; | ||
this.reDecimal = /^[0-9]*[.][0-9]+$/; // /^\d+\.\d+$/ | ||
// TODO: string, unlike alphanumeric, must consider all the characters that can go in a string, including special characters | ||
this.reString = /[a-zA-Z0-9_.]+$/; | ||
this.reAlphanumeric = /[a-zA-Z0-9_.]+$/; | ||
@@ -93,5 +91,2 @@ this.reDate = /^\d{4}-\d{2}-\d{2}$/; | ||
} | ||
isStringFormat(value) { | ||
return this.reString.test(value); | ||
} | ||
isAlphanumeric(value) { | ||
@@ -98,0 +93,0 @@ return this.reAlphanumeric.test(value); |
{ | ||
"name": "h3lp", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Helper for nodeJs", | ||
@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>", |
Sorry, the diff of this file is not supported yet
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
111420
1447