What is string masking?
String masking means protecting selected characters of the string (i.e. replacing characters with ‘X’).
Most of the time developers use string masking to mask mobile number, account number, etc.
Why is string masking important?
Usually doing online transactions on portals mobile number or account number get displayed.
Due to security purposes, details cannot be shown as it is on the screen, they have to mask some of the data of number. Here is where sting masking comes in picture.
Information on npm module
The npm module I build will mask the string by three different ways.
You can check it out here: “https://www.npmjs.com/package/string-masking”