Skip to content

Conversation

@ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Oct 20, 2024

Fixes #2504


The masking of important information is usually implemented in the application itself, so there is no need for us to provide a method ourselves.
This is especially true, since the method has lots of options and would need even more to actually represent real masked data.

As a workaround, you can use the following:

  • faker.finance.creditCardNumber().replaceAll(/(?<=.{4}).(?=.{2})/g, '*')
  • faker.finance.iban().replaceAll(/(?<=.{4})\w(?=.{2})/g, '*')

Popularity-Data from #3215

  • faker.finance.maskedNumber: 59

@ST-DDT ST-DDT added c: chore PR that doesn't affect the runtime behavior p: 1-normal Nothing urgent m: finance Something is referring to the finance module deprecation A deprecation was made in the PR labels Oct 20, 2024
@ST-DDT ST-DDT added this to the v9.x milestone Oct 20, 2024
@ST-DDT ST-DDT requested review from a team October 20, 2024 17:22
@ST-DDT ST-DDT self-assigned this Oct 20, 2024
@netlify
Copy link

netlify bot commented Oct 20, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 2f7b0aa
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/67330bd2b7589d00084ebac7
😎 Deploy Preview https://deploy-preview-3201.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (9abaed1) to head (2f7b0aa).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3201      +/-   ##
==========================================
- Coverage   99.96%   99.96%   -0.01%     
==========================================
  Files        2805     2805              
  Lines      217129   217136       +7     
  Branches      976      973       -3     
==========================================
+ Hits       217055   217059       +4     
- Misses         74       77       +3     
Files with missing lines Coverage Δ
src/modules/finance/index.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@ST-DDT ST-DDT changed the title chore(finance): deprecate maskedNumber for removal refactor(finance): deprecate maskedNumber for removal Oct 20, 2024
@ST-DDT ST-DDT added c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs has workaround Workaround provided or linked and removed c: chore PR that doesn't affect the runtime behavior labels Oct 20, 2024
@xDivisionByZerox
Copy link
Member

Dispite my comment in #3202, I think deprecating this method is valid:

  1. Proofen low to none actual use
  2. The utility this method provides is arguably confusing and niche

@ST-DDT ST-DDT requested review from a team and xDivisionByZerox November 3, 2024 21:23
@ST-DDT ST-DDT requested review from a team, matthewmayer and xDivisionByZerox November 10, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs deprecation A deprecation was made in the PR has workaround Workaround provided or linked m: finance Something is referring to the finance module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate finance.maskedNumber for removal

4 participants