string-masking

1.1.6 • Public • Published

To mask the string

const stringMasking = require ('string-masking')
 
let string = "1234567890"
let output = stringMasking(string,3)
console.log(output)
 
//output 
{ status: 'success', response: 'XXXXXXX890' }
 
const stringMasking = require ('string-masking')
 
let string = "1234567890"
let output = stringMasking(string,-3)
console.log(output)
 
//output 
{ status: 'success', response: '123XXXXXXX' }
 
const stringMasking = require ('string-masking')
 
let string = "1234567890"
let output = stringMasking(string,0)
console.log(output)
 
//output 
{ status: 'success', response: '12XXXXXX90' }
 

Contribution

Rohan Solse
All suggestions and recommendations are more than welcome.
You can get in contact with me @ rohansolse@gmail.com.

/string-masking/

    Package Sidebar

    Install

    npm i string-masking

    Weekly Downloads

    85

    Version

    1.1.6

    License

    ISC

    Unpacked Size

    5.36 kB

    Total Files

    4

    Last publish

    Collaborators

    • rohansolse