verif-string
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,2 +0,2 @@ | ||
declare type Possibility = "lower" | "upper" | "lowerAndUpper" | "containsNumeric"; | ||
declare type Possibility = "lower" | "upper" | "lowerAndUpper"; | ||
export declare class StringManipulator { | ||
@@ -8,4 +8,4 @@ private data; | ||
match(choice: Possibility): boolean; | ||
isNumeric(): RegExpMatchArray; | ||
isAlpha(): RegExpMatchArray; | ||
isNumeric(): boolean; | ||
isAlpha(): boolean; | ||
} | ||
@@ -12,0 +12,0 @@ export declare class SM extends StringManipulator { |
15
index.js
@@ -53,10 +53,19 @@ "use strict"; | ||
return hasLowerCase(this.data) && hasUpperCase(this.data); | ||
case "containsNumeric": | ||
} | ||
}; | ||
StringManipulator.prototype.isNumeric = function () { | ||
return this.data.match(regexp); | ||
if (this.data.match(regexp)) { | ||
return true; | ||
} | ||
else { | ||
return false; | ||
} | ||
}; | ||
StringManipulator.prototype.isAlpha = function () { | ||
return this.data.match(/[a-zA-Z]+/); | ||
if (this.data.match(/[a-zA-Z]+/)) { | ||
return true; | ||
} | ||
else { | ||
return false; | ||
} | ||
}; | ||
@@ -63,0 +72,0 @@ return StringManipulator; |
{ | ||
"name": "verif-string", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A package for manipulate string for verifications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6036
147