Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate finance.maskedNumber for removal #2504

Open
ST-DDT opened this issue Oct 26, 2023 · 1 comment
Open

Deprecate finance.maskedNumber for removal #2504

ST-DDT opened this issue Oct 26, 2023 · 1 comment
Labels
deprecation A deprecation was made in the PR m: finance Something is referring to the finance module p: 1-normal Nothing urgent s: on hold Blocked by something or frozen to avoid conflicts
Milestone

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Oct 26, 2023

We want to deprecate the finance.maskedNumber() method for removal.

Reasons for removal

  • The method has/had a bug for 6 months and it hasn't been reported at all -> low/no actual usage.
  • Configuring the method is more time and code consuming than just adding the parenthesis and ellipsis manually instead.
  • There is no real standard for anonymizing these data. Developers will likely have their own anonymizing function that they use for their actual data.
  • The way the data are anonymized is very specific, in most cases the data are replaced by * instead of being outright removed.
  • There are way more data that you might want to mask such as e-mails, ibans, credit card numbers, that cannot be generated by the method.

Suggested workaround

const data = faker.finance.iban(); // "DE31070946979005090431"
const maskedData = data.replace(/(?<=.{4})\w(?=.{2})/g, '*'); // "DE31****************31"

See also

@ST-DDT ST-DDT added p: 1-normal Nothing urgent m: finance Something is referring to the finance module deprecation A deprecation was made in the PR labels Oct 26, 2023
@ST-DDT ST-DDT added this to the v9.x milestone Oct 26, 2023
@ST-DDT
Copy link
Member Author

ST-DDT commented Oct 26, 2023

On hold until after the release of v9.0 to give the community time to react to this suggestion and state whether they use the method, what for and how it could be made more useful.

@ST-DDT ST-DDT added the s: on hold Blocked by something or frozen to avoid conflicts label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A deprecation was made in the PR m: finance Something is referring to the finance module p: 1-normal Nothing urgent s: on hold Blocked by something or frozen to avoid conflicts
Projects
None yet
Development

No branches or pull requests

1 participant