-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
location.zipCodeByState should throw for unknown states #1736
Comments
Team decision If the user explicitly calls |
Sounds legit to me 👍 I move this to v8 milestone so we do not put more and more into v8.0 |
It would change documented api, so I consider this breaking:
|
Pinging @0916dhkim to leave a comment hete so I can assign them to this issue for #1760 . |
👍 |
If this is a breaking change, this needs to be put into the |
Team Decision
|
Clear and concise description of the problem
Currently, if the given state is not known, then a random zip code is returned.
Usually, if I pass a value to a method, then I expect it to use it and tell me if the value is wrong.
Suggested solution
Throw if there is no data for that state.
Alternative
Keep the method as is.
Additional context
https://next.fakerjs.dev/api/location.html#zipcodebystate
The text was updated successfully, but these errors were encountered: