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.4.0 to 1.5.1

8

index.js

@@ -39,3 +39,3 @@ const groupBy = require('./utils/groupBy')

*/
customArray: function (fields = { name: '{countryNameEn} ({countryCode})', value: '{countryCode}'}, { sortBy = 'name', filter } = {}) {
customArray: function (fields = { name: '{countryNameEn} ({countryCode})', value: '{countryCode}'}, { sortBy = 'name', sortDataBy, filter } = {}) {
const finalCollection = []

@@ -48,2 +48,8 @@

if (sortDataBy && fields[sortDataBy]) {
// ignore upper and lowercase
const collator = new Intl.Collator([], {sensitivity:'accent'})
data.sort((a, b) => collator.compare(a[sortDataBy], b[sortDataBy]))
}
data.forEach(countryData => {

@@ -50,0 +56,0 @@ let collectionObject = {}

2

package.json
{
"name": "country-codes-list",
"version": "1.4.0",
"version": "1.5.1",
"description": "List of codes per country (languages, calling codes, currency codes, etc)",

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

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