Socket
Socket
Sign inDemoInstall

country-codes-list

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country-codes-list - npm Package Compare versions

Comparing version 1.2.7 to 1.3.0

16

index.js

@@ -56,13 +56,5 @@ const groupBy = require('./utils/groupBy')

if (sortBy && fields[sortBy]) {
finalCollection.sort(function(a, b) {
var textA = a[sortBy].toUpperCase(); // ignore upper and lowercase
var textB = b[sortBy].toUpperCase(); // ignore upper and lowercase
if (textA < textB) {
return -1;
}
if (textA > textB) {
return 1;
}
return 0;
})
// ignore upper and lowercase
const collator = new Intl.Collator([], {sensitivity:'accent'})
finalCollection.sort((a, b) => collator.compare(a[sortBy], b[sortBy]))
}

@@ -91,2 +83,2 @@

}
}
}
{
"name": "country-codes-list",
"version": "1.2.7",
"version": "1.3.0",
"description": "List of codes per country (languages, calling codes, currency codes, etc)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,5 +13,5 @@ # country-codes-list

- Country Calling Code: The phone calling code for the country. Obtained from [Wikipedia](https://en.wikipedia.org/wiki/List_of_country_calling_codes#Alphabetical_listing_by_country_or_region).
- Region: The Regional Classifications are from the [International Telecommunications Union](http://www.itu.int/ITU-D/ict/definitions/regions/index.html). Seen [here](https://meta.wikimedia.org/wiki/List_of_countries_by_regional_classification)
# Installation

@@ -41,2 +41,4 @@ ## Install the NPM module

- countryCallingCode
- region
- globalSouth

@@ -43,0 +45,0 @@ #### Example

Sorry, the diff of this file is too big to display

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