-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
Swap allowLeadingZeros
default value to true
#1592
Comments
I can take this one |
Please wait until #1122 was merged |
I would rather change the spec for |
Maybe lets make a benchmark of using faker/src/modules/string/index.ts Lines 333 to 388 in 6e1009a
|
IMO we dont have to us a benchmark as long as it good enough. Otherwise we have to measure all our methods and reimplement them accordingly. |
Why do you want to confuse users with another behavior if the length input differs from one case to another case? |
0001 isnt a real world number, but 0 is. |
Team Decision:
|
allowLeadingZeros
default value to true
Clear and concise description of the problem
Often we have a call like
faker.number.int(9)
and then convert it to a stringSuggested solution
Implement a new method
faker.string.digit()
which returns a digit between[0, 9]
and directly returns it asstring
Alternative
No response
Additional context
Found in
The text was updated successfully, but these errors were encountered: