Skip to content

Commit

Permalink
feat(isISO4217): update iso4217 currency codes according to wiki (val…
Browse files Browse the repository at this point in the history
…idatorjs#2332)

* feat: update iso4217 currency codes.

* feat: update tests for currency code changes.

---------

Co-authored-by: Rubin Bhandari <[email protected]>
  • Loading branch information
cbodtorf and rubiin authored Jun 4, 2024
1 parent 316188d commit f2bc5ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/isISO4217.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import assertString from './util/assertString';
const validISO4217CurrencyCodes = new Set([
'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN',
'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD',
'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK',
'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUP', 'CVE', 'CZK',
'DJF', 'DKK', 'DOP', 'DZD',
'EGP', 'ERN', 'ETB', 'EUR',
'FJD', 'FKP',
'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD',
'HKD', 'HNL', 'HRK', 'HTG', 'HUF',
'HKD', 'HNL', 'HTG', 'HUF',
'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK',
'JMD', 'JOD', 'JPY',
'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT',
Expand All @@ -23,7 +23,7 @@ const validISO4217CurrencyCodes = new Set([
'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL',
'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS',
'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS',
'VES', 'VND', 'VUV',
'VED', 'VES', 'VND', 'VUV',
'WST',
'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX',
'YER',
Expand Down
6 changes: 5 additions & 1 deletion test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11679,13 +11679,15 @@ describe('Validators', () => {
'AED',
'aed',
'AUD',
'CUC',
'CUP',
'EUR',
'GBP',
'LYD',
'MYR',
'SGD',
'SLE',
'USD',
'VED',
'SLE',
],
invalid: [
Expand All @@ -11698,6 +11700,8 @@ describe('Validators', () => {
'RWA',
'EURO',
'euro',
'HRK',
'CUC',
],
});
});
Expand Down

0 comments on commit f2bc5ed

Please sign in to comment.