Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18n-iso-countries

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n-iso-countries - npm Package Compare versions

Comparing version 7.2.0 to 7.3.0

16

langs/en.json

@@ -47,3 +47,3 @@ {

"CL": "Chile",
"CN": "China",
"CN": ["People's Republic of China", "China"],
"CX": "Christmas Island",

@@ -53,4 +53,4 @@ "CC": "Cocos (Keeling) Islands",

"KM": "Comoros",
"CG": "Congo",
"CD": "Congo, the Democratic Republic of the",
"CG": ["Republic of the Congo", "Congo"],
"CD": ["Democratic Republic of the Congo", "Congo"],
"CK": "Cook Islands",

@@ -83,3 +83,3 @@ "CR": "Costa Rica",

"GA": "Gabon",
"GM": "Gambia",
"GM": ["Republic of The Gambia", "The Gambia", "Gambia"],
"GE": "Georgia",

@@ -107,3 +107,3 @@ "DE": "Germany",

"ID": "Indonesia",
"IR": ["Iran", "Islamic Republic of Iran"],
"IR": ["Islamic Republic of Iran", "Iran"],
"IQ": "Iraq",

@@ -164,3 +164,3 @@ "IE": "Ireland",

"NF": "Norfolk Island",
"MK": "North Macedonia, Republic of",
"MK": ["The Republic of North Macedonia", "North Macedonia"],
"MP": "Northern Mariana Islands",

@@ -216,3 +216,3 @@ "NO": "Norway",

"TJ": "Tajikistan",
"TZ": "Tanzania, United Republic of",
"TZ": ["United Republic of Tanzania", "Tanzania"],
"TH": "Thailand",

@@ -233,3 +233,3 @@ "TL": "Timor-Leste",

"GB": ["United Kingdom", "UK", "Great Britain"],
"US": ["United States of America","United States", "USA"],
"US": ["United States of America", "United States", "USA"],
"UM": "United States Minor Outlying Islands",

@@ -236,0 +236,0 @@ "UY": "Uruguay",

@@ -104,3 +104,3 @@ {

"ID": "Indonesia",
"IR": "Irán (República Islámica de)",
"IR": ["Irán", "República Islámica de Irán"],
"IQ": "Iraq",

@@ -107,0 +107,0 @@ "IE": "Irlanda",

@@ -7,3 +7,3 @@ {

"DZ": "Algérie",
"AS": "Samoa américaine",
"AS": "Samoa américaines",
"AD": "Andorre",

@@ -13,3 +13,3 @@ "AO": "Angola",

"AQ": "Antarctique",
"AG": "Antigua et Barbuda",
"AG": "Antigua-et-Barbuda",
"AR": "Argentine",

@@ -22,6 +22,6 @@ "AM": "Arménie",

"BS": "Bahamas",
"BH": "Bahrein",
"BH": "Bahreïn",
"BD": "Bangladesh",
"BB": "Barbade",
"BY": "Bielorussie",
"BY": "Biélorussie",
"BE": "Belgique",

@@ -46,4 +46,4 @@ "BZ": "Belize",

"CV": "Cap-Vert",
"KY": "Caïmanes",
"CF": "Centrafricaine, République",
"KY": "Îles Caïmans",
"CF": "République Centrafricaine",
"TD": "Tchad",

@@ -53,7 +53,7 @@ "CL": "Chili",

"CX": "Île Christmas",
"CC": "Cocos",
"CC": "Îles Cocos",
"CO": "Colombie",
"KM": "Comores",
"CG": "République du Congo",
"CD": "Congo, République démocratique",
"CD": "République démocratique du Congo",
"CK": "Îles Cook",

@@ -93,3 +93,3 @@ "CR": "Costa Rica",

"GL": "Groenland",
"GD": "Grenada",
"GD": "Grenade",
"GP": "Guadeloupe",

@@ -103,3 +103,3 @@ "GU": "Guam",

"HM": "Îles Heard-et-MacDonald",
"VA": "Saint-Siège",
"VA": "Saint-Siège (Vatican)",
"HN": "Honduras",

@@ -122,6 +122,6 @@ "HK": "Hong Kong",

"KI": "Kiribati",
"KP": "Corée du Nord, République populaire démocratique",
"KR": "Corée du Sud, République",
"KW": "Koweit",
"KG": "Kirghistan",
"KP": "Corée du Nord",
"KR": "Corée du Sud",
"KW": "Koweït",
"KG": "Kirghizistan",
"LA": "Laos",

@@ -169,7 +169,7 @@ "LV": "Lettonie",

"NF": "Île Norfolk",
"MP": "Mariannes du Nord",
"MP": "Îles Mariannes du Nord",
"NO": "Norvège",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PW": "Palaos",
"PS": "Palestine",

@@ -181,3 +181,3 @@ "PA": "Panama",

"PH": "Philippines",
"PN": "Pitcairn",
"PN": "Îles Pitcairn",
"PL": "Pologne",

@@ -194,7 +194,7 @@ "PT": "Portugal",

"LC": "Sainte-Lucie",
"PM": "Saint Pierre and Miquelon",
"VC": "Saint-Vincent et les Grenadines",
"PM": "Saint-Pierre-et-Miquelon",
"VC": "Saint-Vincent-et-les-Grenadines",
"WS": "Samoa",
"SM": "Saint-Marin",
"ST": "São Tomé et Principe",
"ST": "São Tomé-et-Principe",
"SA": "Arabie Saoudite",

@@ -207,3 +207,3 @@ "SN": "Sénégal",

"SI": "Slovénie",
"SB": "Salomon",
"SB": "Îles Salomon",
"SO": "Somalie",

@@ -217,3 +217,3 @@ "ZA": "Afrique du Sud",

"SJ": "Svalbard et Île Jan Mayen",
"SZ": "Ngwane, Royaume d'Eswatini",
"SZ": "Royaume d'Eswatini",
"SE": "Suède",

@@ -224,9 +224,9 @@ "CH": "Suisse",

"TJ": "Tadjikistan",
"TZ": "Tanzanie, République unie",
"TZ": "République unie de Tanzanie",
"TH": "Thaïlande",
"TL": "Timor Leste",
"TL": "Timor-Leste",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad et Tobago",
"TT": "Trinité-et-Tobago",
"TN": "Tunisie",

@@ -250,3 +250,3 @@ "TR": "Turquie",

"VI": "Îles vierges américaines",
"WF": "Wallis et Futuna",
"WF": "Wallis-et-Futuna",
"EH": "Sahara occidental",

@@ -267,5 +267,5 @@ "YE": "Yémen",

"SX": "Saint-Martin (partie néerlandaise)",
"SS": "Sud-Soudan",
"SS": "Soudan du Sud",
"XK": "Kosovo"
}
}
{
"name": "i18n-iso-countries",
"version": "7.2.0",
"version": "7.3.0",
"description": "i18n for ISO 3166-1 country codes",

@@ -5,0 +5,0 @@ "typings": "index.d.ts",

@@ -31,20 +31,12 @@ [![Build Status](https://secure.travis-ci.org/michaelwittig/node-i18n-iso-countries.png)](http://travis-ci.org/michaelwittig/node-i18n-iso-countries)

// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log("US (Alpha-2) => " + countries.getName("US", "en", {select: "official"})); // United States of America
console.log("US (Alpha-2) => " + countries.getName("US", "de", {select: "official"})); // Vereinigte Staaten von Amerika
console.log("USA (Alpha-3) => " + countries.getName("USA", "en", {select: "official"})); // United States of America
console.log("USA (Numeric) => " + countries.getName("840", "en", {select: "official"})); // United States of America
console.log("US (Alpha-2) => " + countries.getName("US", "en")); // United States of America
console.log("US (Alpha-2) => " + countries.getName("US", "de")); // Vereinigte Staaten von Amerika
console.log("USA (Alpha-3) => " + countries.getName("USA", "en")); // United States of America
console.log("USA (Numeric) => " + countries.getName("840", "en")); // United States of America
```
### Get all names by their ISO 3166-1 Alpha-2 code
#### Get aliases/short name using select
```javascript
var countries = require("i18n-iso-countries");
// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(countries.getNames("en", {select: "official"})); // { 'AF': 'Afghanistan', 'AL': 'Albania', [...], 'ZM': 'Zambia', 'ZW': 'Zimbabwe' }
```
### Get aliases using select
```javascript
// Some countries have alias names defined. `select` is used to control which
// Some countries have alias/short names defined. `select` is used to control which
// name will be returned.

@@ -60,2 +52,10 @@ console.log("GB (select: official) => " + countries.getName("GB", "en", {select: "official"})); // United Kingdom

### Get all names by their ISO 3166-1 Alpha-2 code
```javascript
var countries = require("i18n-iso-countries");
// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(countries.getNames("en", {select: "official"})); // { 'AF': 'Afghanistan', 'AL': 'Albania', [...], 'ZM': 'Zambia', 'ZW': 'Zimbabwe' }
```
### Supported languages (ISO 639-1)

@@ -145,5 +145,3 @@

var countries = require("i18n-iso-countries");
console.log(
"List of supported languages => " + countries.getSupportedLanguages()
);
console.log("List of supported languages => " + countries.getSupportedLanguages());
// List of supported languages => ["cy", "dv", "sw", "eu", "af", "am", ...]

@@ -157,12 +155,6 @@ ```

// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(
"United States of America => " +
countries.getAlpha2Code("United States of America", "en")
);
console.log("United States of America => " + countries.getAlpha2Code("United States of America", "en"));
// United States of America => US
console.log(
"United States of America => " +
countries.getAlpha3Code("United States of America", "en")
);
console.log("United States of America => " + countries.getAlpha3Code("United States of America", "en"));
// United States of America => USA

@@ -178,5 +170,3 @@ ```

// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(
"USA (Alpha-3) => " + countries.alpha3ToAlpha2("USA") + " (Alpha-2)"
);
console.log("USA (Alpha-3) => " + countries.alpha3ToAlpha2("USA") + " (Alpha-2)");
// USA (Alpha-3) => US (Alpha-2)

@@ -190,5 +180,3 @@ ```

// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(
"840 (Numeric) => " + countries.numericToAlpha2("840") + " (Alpha-2)"
);
console.log("840 (Numeric) => " + countries.numericToAlpha2("840") + " (Alpha-2)");
// 840 (Numeric) => US (Alpha-2)

@@ -211,5 +199,3 @@ ```

// in a browser environment: countries.registerLocale(require("i18n-iso-countries/langs/en.json"));
console.log(
"840 (Numeric) => " + countries.numericToAlpha3("840") + " (Alpha-3)"
);
console.log("840 (Numeric) => " + countries.numericToAlpha3("840") + " (Alpha-3)");
// 840 (Numeric) => USA (Alpha-3)

@@ -216,0 +202,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc