Socket
Socket
Sign inDemoInstall

currency-codes

Package Overview
Dependencies
2
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.1 to 2.0.0

iso-4217-list-one.xml

120

data.js
/*
Follows ISO 4217, https://www.iso.org/iso-4217-currency-codes.html
Data last updated 2018 May 1st
See https://www.currency-iso.org/dam/downloads/lists/list_one.xml
Data last updated 2018-08-29
*/

@@ -49,3 +50,3 @@

"countries": [
"CuraçAo",
"Curaçao",
"Sint Maarten (Dutch Part)"

@@ -81,3 +82,3 @@ ]

"Cocos (Keeling) Islands (The)",
"Heard Island And Mcdonald Islands",
"Heard Island and Mcdonald Islands",
"Kiribati",

@@ -113,3 +114,3 @@ "Nauru",

"countries": [
"Bosnia And Herzegovina"
"Bosnia and Herzegovina"
]

@@ -267,3 +268,3 @@ },

"countries": [
"Congo (The Democratic Republic Of The)"
"Congo (The Democratic Republic of The)"
]

@@ -460,2 +461,3 @@ },

"countries": [
"Åland Islands",
"Andorra",

@@ -490,8 +492,7 @@ "Austria",

"Saint Martin (French Part)",
"Saint Pierre And Miquelon",
"Saint Pierre and Miquelon",
"San Marino",
"Slovakia",
"Slovenia",
"Spain",
"Åland Islands"
"Spain"
]

@@ -524,5 +525,5 @@ },

"Guernsey",
"Isle Of Man",
"Isle of Man",
"Jersey",
"United Kingdom Of Great Britain And Northern Ireland (The)"
"United Kingdom of Great Britain and Northern Ireland (The)"
]

@@ -762,3 +763,3 @@ },

"countries": [
"Korea (The Democratic People's Republic Of)"
"Korea (The Democratic People’s Republic Of)"
]

@@ -808,3 +809,3 @@ },

"countries": [
"Lao People's Democratic Republic (The)"
"Lao People’s Democratic Republic (The)"
]

@@ -1028,3 +1029,3 @@ },

"Norway",
"Svalbard And Jan Mayen"
"Svalbard and Jan Mayen"
]

@@ -1094,3 +1095,3 @@ },

"digits": 2,
"currency": "Philippine Piso",
"currency": "Philippine Peso",
"countries": [

@@ -1232,3 +1233,3 @@ "Philippines (The)"

"countries": [
"Saint Helena, Ascension And Tristan Da Cunha"
"Saint Helena, Ascension and Tristan Da Cunha"
]

@@ -1278,3 +1279,3 @@ },

"countries": [
"Sao Tome And Principe"
"Sao Tome and Principe"
]

@@ -1306,3 +1307,3 @@ },

"countries": [
"Swaziland"
"Eswatini"
]

@@ -1350,3 +1351,3 @@ },

"digits": 2,
"currency": "Pa'anga",
"currency": "Pa’anga",
"countries": [

@@ -1371,3 +1372,3 @@ "Tonga"

"countries": [
"Trinidad And Tobago"
"Trinidad and Tobago"
]

@@ -1381,3 +1382,3 @@ },

"countries": [
"Taiwan (Province Of China)"
"Taiwan (Province of China)"
]

@@ -1419,3 +1420,3 @@ },

"American Samoa",
"Bonaire, Sint Eustatius And Saba",
"Bonaire, Sint Eustatius and Saba",
"British Indian Ocean Territory (The)",

@@ -1433,5 +1434,5 @@ "Ecuador",

"Timor-Leste",
"Turks And Caicos Islands (The)",
"Turks and Caicos Islands (The)",
"United States Minor Outlying Islands (The)",
"United States Of America (The)",
"United States of America (The)",
"Virgin Islands (British)",

@@ -1447,3 +1448,3 @@ "Virgin Islands (U.S.)"

"countries": [
"United States Of America (The)"
"United States of America (The)"
]

@@ -1455,3 +1456,3 @@ },

"digits": 0,
"currency": "Uruguay Peso en Unidades Indexadas (URUIURUI)",
"currency": "Uruguay Peso en Unidades Indexadas (UI)",
"countries": [

@@ -1471,2 +1472,11 @@ "Uruguay"

{
"code": "UYW",
"number": "927",
"digits": 4,
"currency": "Unidad Previsional",
"countries": [
"Uruguay"
]
},
{
"code": "UZS",

@@ -1481,6 +1491,6 @@ "number": "860",

{
"code": "VEF",
"number": "937",
"code": "VES",
"number": "928",
"digits": 2,
"currency": "Bolívar",
"currency": "Bolívar Soberano",
"countries": [

@@ -1536,3 +1546,5 @@ "Venezuela (Bolivarian Republic Of)"

"currency": "Silver",
"countries": []
"countries": [
"Zz11_silver"
]
},

@@ -1544,3 +1556,5 @@ {

"currency": "Gold",
"countries": []
"countries": [
"Zz08_gold"
]
},

@@ -1552,3 +1566,5 @@ {

"currency": "Bond Markets Unit European Composite Unit (EURCO)",
"countries": []
"countries": [
"Zz01_bond Markets Unit European_eurco"
]
},

@@ -1560,3 +1576,5 @@ {

"currency": "Bond Markets Unit European Monetary Unit (E.M.U.-6)",
"countries": []
"countries": [
"Zz02_bond Markets Unit European_emu-6"
]
},

@@ -1568,3 +1586,5 @@ {

"currency": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",
"countries": []
"countries": [
"Zz03_bond Markets Unit European_eua-9"
]
},

@@ -1576,3 +1596,5 @@ {

"currency": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",
"countries": []
"countries": [
"Zz04_bond Markets Unit European_eua-17"
]
},

@@ -1586,9 +1608,9 @@ {

"Anguilla",
"Antigua And Barbuda",
"Antigua and Barbuda",
"Dominica",
"Grenada",
"Montserrat",
"Saint Kitts And Nevis",
"Saint Kitts and Nevis",
"Saint Lucia",
"Saint Vincent And The Grenadines"
"Saint Vincent and the Grenadines"
]

@@ -1602,3 +1624,3 @@ },

"countries": [
"International Monetary Fund (Imf) "
"International Monetary Fund (Imf) "
]

@@ -1627,3 +1649,5 @@ },

"currency": "Palladium",
"countries": []
"countries": [
"Zz09_palladium"
]
},

@@ -1638,3 +1662,3 @@ {

"New Caledonia",
"Wallis And Futuna"
"Wallis and Futuna"
]

@@ -1647,3 +1671,5 @@ },

"currency": "Platinum",
"countries": []
"countries": [
"Zz10_platinum"
]
},

@@ -1664,3 +1690,5 @@ {

"currency": "Codes specifically reserved for testing purposes",
"countries": []
"countries": [
"Zz06_testing_code"
]
},

@@ -1673,3 +1701,3 @@ {

"countries": [
"Member Countries Of The African Development Bank Group"
"Member Countries of the African Development Bank Group"
]

@@ -1682,3 +1710,5 @@ },

"currency": "The codes assigned for transactions where no currency is involved",
"countries": []
"countries": [
"Zz07_no_currency"
]
},

@@ -1723,2 +1753,2 @@ {

}
];
];

@@ -21,2 +21,4 @@ declare module "currency-codes" {

export function countries(): string[];
export const publishDate: string;
}
var first = require('first-match');
var nub = require('nub');
var data = require('./data');
var publishDate = require('./iso-4217-publish-date');

@@ -58,1 +59,2 @@ var code = function(code) {

exports.countries = countries;
exports.publishDate = publishDate;
{
"name": "currency-codes",
"types": "index.d.ts",
"version": "1.5.1",
"version": "2.0.0",
"description": "Lookup currency codes based on ISO 4217",

@@ -21,6 +21,14 @@ "repository": "git://github.com/freeall/currency-codes.git",

},
"devDependencies": {
"@gouch/to-title-case": "^2.2.1",
"axios": "^0.19.2",
"xml2js": "^0.4.23"
},
"scripts": {
"test": "node test.js"
"test": "node test.js",
"iso:fetch-xml": "node scripts/fetch-iso-4217-xml.js",
"iso:ingest-xml": "node scripts/ingest-iso-4217-xml.js",
"iso": "npm run iso:fetch-xml && npm run iso:ingest-xml"
},
"license": "MIT"
}

@@ -143,5 +143,41 @@ # currency-codes

## publishDate
```js
var cc = require('currency-codes');
console.log(cc.publishDate);
/*
2018-08-29
*/
```
## ISO-4217
Fetch the latest copy of ISO-4217 from the [maintainer](https://www.currency-iso.org/) and update this library's currency data file.
```bash
$ npm run iso
> currency-codes@1.5.1 iso currency-codes
> npm run iso:fetch-xml && npm run iso:ingest-xml
> currency-codes@1.5.1 iso:fetch-xml currency-codes
> node scripts/fetch-iso-4217-xml.js
Downloaded https://www.currency-iso.org/dam/downloads/lists/list_one.xml to iso-4217-list-one.xml
> currency-codes@1.5.1 iso:ingest-xml currency-codes
> node scripts/ingest-iso-4217-xml.js
Ingested iso-4217-list-one.xml into data.js
Wrote publish date to iso-4217-publish-date.js
```
Note: You may have to manually tweak the capitalization of some country's names.
# License
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc