-
-
Notifications
You must be signed in to change notification settings - Fork 953
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
Petition to undeprecate random primitives #607
Comments
I found the original content in this event history: Marak/faker.js - Github Event History Unfortunately, it does not contain a specific reason for that change. |
We created a discussion on how to improve on this: #805 |
When we bring stuff from datatype back to random, I think we should use new names like:
|
I think moving it to individual modules (strings/numbers) might provide a better developer experience, because first you select what you want and then you have all the variations available for use. |
Where would you put |
|
I can see the discussion going on here and in #805 - this is a bit confusing. Maybe we should close this issue and focus on the discussion only, which should then be spit into smaller issues? |
In an older version, many of the methods on
faker.random
that return primitive values were deprecated and moved tofaker.datatype
. I never understood the reason, and I'd argue that restoring them is better developer experience.faker.random
random
is better for intellisense becausefaker.datatype
clashes withfaker.database
. It's much nicer to just type "faker.r" then tab.faker.random
andfaker.datatype
serve the same purpose of grabbing fake primitives.I'm bringing some of my own bias and assumptions here, so I reserve the right to be totally wrong, but I thought I would mention it in the spirit of trying to make this library better.
The text was updated successfully, but these errors were encountered: