-
-
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
feat(finance): currency object #1809
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #1809 +/- ##
========================================
Coverage 99.63% 99.64%
========================================
Files 2355 2355
Lines 236459 236843 +384
Branches 1159 1155 -4
========================================
+ Hits 235605 235993 +388
+ Misses 832 828 -4
Partials 22 22
|
Team Decision Change the locale data to contain [{ name, code, symbol }] |
60120b6
to
57fb85b
Compare
57fb85b
to
2d58445
Compare
Sorry, had some issues with my branch so had to force-push |
This was my script to transform the definitions: 'use strict';
const fs = require('fs');
const langs = ['en','el', 'fr_CH', 'fr', 'fa'];
const { faker } = require('@faker-js/faker');
for (let lang of langs) {
let c = faker.locales[lang].finance.currency;
let newCurr = Object.keys(c).map((k) => {
return { name: k, code: c[k].code, symbol: c[k].symbol };
});
let str = JSON.stringify(newCurr, null, 2);
fs.writeFileSync(
`./src/locales/${lang}/finance/currency.ts`,
`export default ${str}`
);
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a random seeded test for the currency
object.
added in 844cb20 |
i think there are a few "currencies" which could be removed e.g. { and various metals like Gold, Platinum etc, Should i include that in this PR or wait and do as a seperate PR |
comparing https://en.wikipedia.org/wiki/List_of_circulating_currencies with the list i'd suggest the removal of
and the addition of [ 'MRU', 'SLE', 'SSP'] (and possibly 'VED' ) these are a variety of currencies which got replaced (e.g. EEK -> EUR), changed (e.g. MRO -> MRU) or are non-currencies (e.g. XTS, XAU). |
Please do that in a separate PR as the removed entries will be lost within the other changes to the locale definitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the re-export and the deprecation this looks good to me.
i added the re-export in 86d1ae0 Not planning to deperecate other methods (per #1809 (comment) ) unless others feel strongly they should be |
Lets discuss this in the next team meeting. |
Team decision We won't deprecate the old methods. Then this PR is ready for review and merge. |
fix #1733