string-masking
Advanced tools
+8
-7
| function stringMask(string,digit){ | ||
| try{ | ||
| let model = {} | ||
| let note = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| if(!string || digit == undefined ){ | ||
| model.status = "failure" | ||
| model.response = "Ethier string, digit or both are missing or misplaced." | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -19,3 +20,3 @@ } | ||
| model.response = "Blank string cannot be processed" | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -26,3 +27,3 @@ } | ||
| model.response = "Entered string length cannot be equal to greater than the digit count" | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -36,3 +37,3 @@ } | ||
| model.response = "Entered strings length is too less for this operation." | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -69,3 +70,3 @@ } | ||
| model.response = "unmasking value can not be blank" | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| // console.log(model) | ||
@@ -88,3 +89,3 @@ return (model) | ||
| model.response = "Entered string length cannot be equal to greater than the digit count" | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -113,3 +114,3 @@ } | ||
| model.response = "Something went wrong, Please check the syntax." | ||
| model.NOTE = "Please email us on rohansolse@gmail.comfor NPM related suggestions/bugs(with input)." | ||
| model.NOTE = note | ||
| return (model) | ||
@@ -116,0 +117,0 @@ } |
+1
-1
| { | ||
| "name": "string-masking", | ||
| "version": "1.1.3", | ||
| "version": "1.1.4", | ||
| "description": "to mask string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
111
0.91%4367
-9.77%