-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
Better currencies #1733
Comments
We are currently in a debate whether or not we should provide these complex objects (airport/airline...). Could you give us an example why it is important that you get matching currency names and symbols instead of any? Also could you think of a general rule what should be provided in these complex objects and what shouldnt? |
From the airline PR: #1699 (comment)
|
My use case: I'm mocking an API response, and I'd like to show currencies in my UI in a dropdown, like so |
i think in general complex objects make sense if the objects reflect real-world things and so there's a fixed mapping between values. For example
but NOT when the values are themselves fake/arbitrary
|
This makes sense, it would be weird to create an object:
and get `{ name: "Icelandair", iataCode: "BA" } |
since the airline PR landed, and since this seems to follow the rule of thumb i wrote at #1733 (comment) i went ahead and added a PR at #1809 |
I'm sorry you missed #1699 (comment) |
Okay no worries just leave this unmerged until you make a final decision about how to handle these kind of issues. |
Team decision We will support complex objects for static data (such as currency), but we won't add dynamic complex objects (such as a person{firstName, lastName}). We have to add support for the fake method (#1850), deprecate the individual currencyName/code methods and remove datatype.object and array (Separate issues/PRs). |
Clear and concise description of the problem
This will have mismatched data :)
Suggested solution
Like
unit()
, it returns{ name: 'meter', symbol: 'm' }
It would be nice if
finance.currency()
returned{ name: 'US Dollar', symbol: '$', code: 'USD' }
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: