aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarak <[email protected]>2020-06-09 23:41:32 -0500
committerGitHub <[email protected]>2020-06-09 23:41:32 -0500
commit98195ceb0815aa705a958ea4e7bf4b80ce068443 (patch)
treefc779a9690521309869ee8de41e65f113bd94d28
parent3b2fa4aebccee52ae1bafc15d575061fb30c3cf1 (diff)
parentf4c2785d4ccaeca4d8ce6bfab2b43724de01d946 (diff)
downloadfaker-98195ceb0815aa705a958ea4e7bf4b80ce068443.tar.xz
faker-98195ceb0815aa705a958ea4e7bf4b80ce068443.zip
Merge pull request #912 from Zache/master
Fixes currency codes
-rw-r--r--lib/locales/en/finance/currency.js72
-rw-r--r--test/finance.unit.js2
2 files changed, 49 insertions, 25 deletions
diff --git a/lib/locales/en/finance/currency.js b/lib/locales/en/finance/currency.js
index 442d937c..c584d9dc 100644
--- a/lib/locales/en/finance/currency.js
+++ b/lib/locales/en/finance/currency.js
@@ -71,8 +71,12 @@ module["exports"] = {
"code": "BND",
"symbol": "$"
},
- "Boliviano Mvdol": {
- "code": "BOB BOV",
+ "Boliviano": {
+ "code": "BOB",
+ "symbol": "$b"
+ },
+ "Mvdol": {
+ "code": "BOV",
"symbol": "$b"
},
"Brazilian Real": {
@@ -107,24 +111,36 @@ module["exports"] = {
"code": "CHF",
"symbol": "CHF"
},
- "Chilean Peso Unidades de fomento": {
- "code": "CLP CLF",
+ "Chilean Peso": {
+ "code": "CLP",
+ "symbol": "$"
+ },
+ "Unidades de fomento": {
+ "code": "CLF",
"symbol": "$"
},
"Yuan Renminbi": {
"code": "CNY",
"symbol": "¥"
},
- "Colombian Peso Unidad de Valor Real": {
- "code": "COP COU",
+ "Colombian Peso": {
+ "code": "COP",
+ "symbol": "$"
+ },
+ "Unidad de Valor Real": {
+ "code": "COU",
"symbol": "$"
},
"Costa Rican Colon": {
"code": "CRC",
"symbol": "₡"
},
- "Cuban Peso Peso Convertible": {
- "code": "CUP CUC",
+ "Cuban Peso": {
+ "code": "CUP",
+ "symbol": "₱"
+ },
+ "Peso Convertible": {
+ "code": "CUC",
"symbol": "₱"
},
"Cape Verde Escudo": {
@@ -223,8 +239,8 @@ module["exports"] = {
"code": "HRK",
"symbol": "kn"
},
- "Gourde US Dollar": {
- "code": "HTG USD",
+ "Gourde": {
+ "code": "HTG",
"symbol": ""
},
"Forint": {
@@ -243,8 +259,8 @@ module["exports"] = {
"code": "INR",
"symbol": ""
},
- "Indian Rupee Ngultrum": {
- "code": "INR BTN",
+ "Ngultrum": {
+ "code": "BTN",
"symbol": ""
},
"Iraqi Dinar": {
@@ -379,8 +395,12 @@ module["exports"] = {
"code": "MWK",
"symbol": ""
},
- "Mexican Peso Mexican Unidad de Inversion (UDI)": {
- "code": "MXN MXV",
+ "Mexican Peso": {
+ "code": "MXN",
+ "symbol": "$"
+ },
+ "Mexican Unidad de Inversion (UDI)": {
+ "code": "MXV",
"symbol": "$"
},
"Malaysian Ringgit": {
@@ -415,8 +435,8 @@ module["exports"] = {
"code": "OMR",
"symbol": "﷼"
},
- "Balboa US Dollar": {
- "code": "PAB USD",
+ "Balboa": {
+ "code": "PAB",
"symbol": "B/."
},
"Nuevo Sol": {
@@ -507,8 +527,8 @@ module["exports"] = {
"code": "STD",
"symbol": ""
},
- "El Salvador Colon US Dollar": {
- "code": "SVC USD",
+ "El Salvador Colon": {
+ "code": "SVC",
"symbol": "$"
},
"Syrian Pound": {
@@ -567,8 +587,12 @@ module["exports"] = {
"code": "USD",
"symbol": "$"
},
- "Peso Uruguayo Uruguay Peso en Unidades Indexadas": {
- "code": "UYU UYI",
+ "Peso Uruguayo Uruguay": {
+ "code": "UYU",
+ "symbol": "$U"
+ },
+ "Peso en Unidades Indexadas": {
+ "code": "UYI",
"symbol": "$U"
},
"Uzbekistan Sum": {
@@ -659,12 +683,12 @@ module["exports"] = {
"code": "ZAR",
"symbol": "R"
},
- "Rand Loti": {
- "code": "ZAR LSL",
+ "Loti": {
+ "code": "LSL",
"symbol": ""
},
- "Rand Namibia Dollar": {
- "code": "ZAR NAD",
+ "Namibia Dollar": {
+ "code": "NAD",
"symbol": ""
},
"Zambian Kwacha": {
diff --git a/test/finance.unit.js b/test/finance.unit.js
index bad85884..6c1cb142 100644
--- a/test/finance.unit.js
+++ b/test/finance.unit.js
@@ -226,7 +226,7 @@ describe('finance.js', function () {
it("returns a random currency code with a format", function () {
var currencyCode = faker.finance.currencyCode();
- assert.ok(currencyCode.match(/[A-Z]{3}/));
+ assert.ok(currencyCode.match(/^[A-Z]{3}$/));
});
});