Sumukha1496 / maskdata

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

adding options for Email data masking #20

Open lionelmalletpro opened 3 years ago

lionelmalletpro commented 3 years ago

i would love to have unmaskedEndCharactersBeforeAt and unmaskedStartCharactersAfterAt

so with

const emailMask2Options = {
  maskWith: "*",
  unmaskedStartCharactersBeforeAt: 2,
  unmaskedEndCharactersBeforeAt: 2,
  unmaskedStartCharactersAfterAt: 2,
  unmaskedEndCharactersAfterAt: 2,
  maskAtTheRate: false,
};

i would get : ab*********yz@gm*****om

Sumukha1496 commented 3 years ago

@lionelmalletpro , This feature looks cool. Let me think about it and add in the next version.

lionelmalletpro commented 3 years ago

Thanks I was developping an intranet website for a company where all emails have the same domaine (even if it's not always the case) So I think it would be more usefull to have more options available to mask and unmask data in the "BEFORE @" part Best regards