-
-
Notifications
You must be signed in to change notification settings - Fork 934
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 helpers.replaceSymbolWithNumber #1994
Comments
Blocked by/Partially implemented by: |
Team Decision We want this. |
@ST-DDT Can you assign this one to me I am gonna use Q1. Can you confirm one thing, as we are deprecating this function what would be the change required at this line phone_number.ts#L13 Q2. What will be the Q3. With deprecation, will there be any change in the tests? Should we remove tests or not? |
It should list the supported replacements.
I dont think that we need one. The deprecation message can cover the string replace. Maybe we can refer to the new helpers regex method.
Tests shouldn't be removed. We might have to change some of them slightly (test snapshots etc). |
Thanks for the prompt replies
One thing I need help on, I might not be aware of |
The main reason for the existence of this method seems to be handling North American phone numbers which need the "no 0 or 1 in this position" symbol |
faker.helpers.fake would probably work. |
Maybe it would be best to keep the current implementation but only as an internal helper for phone number patterns? No longer expose it in helpers module after deprecation. |
@suyashgulati Are you still interested in this? ToDos:
|
@ST-DDT Yes I am still up for it. Thanks for the detailed todos. I wasn't clear about the expectation after the open ended discussion. |
Clear and concise description of the problem
The method
helpers.replaceSymbolWithNumber
is mostly a black box that does some arbritary char -> digit transformations.The implementation contains unexpected branches.
Suggested solution
Deprecate
helpers.replaceSymbolWithNumber
Alternative
Keep the method as is
Additional context
No response
The text was updated successfully, but these errors were encountered: