Sumukha1496 / maskdata

maskdata is a node.js module to mask various kinds of data
MIT License
92 stars 7 forks source link

unmaskedStartCharacters, unmaskedEndCharacters in mask String function #17

Closed Sumukha1496 closed 7 months ago

Sumukha1496 commented 3 years ago

unmaskedStartCharacters, unmaskedEndCharacters in mask String function

pengxiangg commented 10 months ago

Hi @Sumukha1496 thank you for providing this library. I saw that this issue has been closed as completed but I'm not able to use the unmaskedStartCharacters and unmaskedEndCharacters options in the mask string function. Are the options not feasible for the mask string function?

Thank you!

Sumukha1496 commented 10 months ago

Hi @pengxiangg , Thank you for raising the issue. Can you please let me know your usecase so that I can plan for adding these parameters. For now, I will reopen this issue.

Sumukha1496 commented 10 months ago

Why I am asking for the usecase is, If its similar to password masking, you already have the option to use maskPassword() with unmaskedStartCharacters, unmaskedEndCharacters. If it is not a password and you don;t want to mix your usecase with the password masking usecase, I can think about it and plan to release these features in the next version

pengxiangg commented 9 months ago

Hi @Sumukha1496 Thank you for your reply. My use case is for address. I originally used the mask string function to keep the spaces visible, but I realised that it did not have the unmaskedStartCharacters. I'm using the password masking now for unmaskedStartCharacters as keeping the spaces visible isn't that crucial for my use case.

Sumukha1496 commented 7 months ago

@pengxiangg , Please check V1.3.0 --> https://www.npmjs.com/package/maskdata?activeTab=readme#json-mask-examples With this you can extend your usecase to generic strings. If you need more configs here, let me know. Closing this issue for now.