@alkimia/utilities
Advanced tools
Comparing version 1.0.31 to 1.0.33
{ | ||
"name": "@alkimia/utilities", | ||
"version": "1.0.31", | ||
"version": "1.0.33", | ||
"description": "This README would normally document whatever steps are necessary to get your application up and running.", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"keywords": [], | ||
"author": "", | ||
"author": "InterSides", | ||
"license": "ISC", | ||
@@ -18,0 +18,0 @@ "bugs": { |
@@ -192,9 +192,10 @@ | ||
isValidPassword (passwordFieldInput) { | ||
if(this.isNonemptyString(passwordFieldInput)){ | ||
return !!passwordFieldInput.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\^$*.\[\]{}\(\)?\-“!@#%&\/,><\’:;|_~`])\S{8,99}$/); | ||
} | ||
else{ | ||
return false | ||
} | ||
/** | ||
* | ||
* @param {string} password | ||
* @return {boolean} | ||
*/ | ||
isValidPassword:function(password){ | ||
const PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\^$*.[\]{}()?\-"!@#%&/,><':;|_~`])\S{8,99}$/; | ||
return PASSWORD_REGEX.test(password); | ||
}, | ||
@@ -205,12 +206,8 @@ | ||
* | ||
* @param emailFieldInput | ||
* @param {string} email | ||
* @return {boolean} | ||
*/ | ||
isValidEmail (emailFieldInput) { | ||
if(this.isNonemptyString(emailFieldInput)){ | ||
return !!emailFieldInput.match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/); | ||
} | ||
else{ | ||
return false; | ||
} | ||
isValidEmail:function(email){ | ||
const EMAIL_REGEX = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i; | ||
return EMAIL_REGEX.test(email); | ||
}, | ||
@@ -220,2 +217,12 @@ | ||
* | ||
* @param {string} token | ||
* @return {boolean} | ||
*/ | ||
isValidJWT:function(token){ | ||
const JWT_REGEX = /^(?:[\w-]*\.){2}[\w-]*$/; | ||
return JWT_REGEX.test(token); | ||
}, | ||
/** | ||
* | ||
* @param {string} _val | ||
@@ -222,0 +229,0 @@ */ |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
14686
384
0