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

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.2 to 1.2.3

10

index.js

@@ -31,5 +31,11 @@ const supplant = require('./utils/supplant')

*/
customArray: function (fields = { name: '{countryNameEn} ({countryCode})', value: '{countryCode}'}, { sortBy = 'name' } = {}) {
customArray: function (fields = { name: '{countryNameEn} ({countryCode})', value: '{countryCode}'}, { sortBy = 'name', filter } = {}) {
const finalCollection = []
countriesData.forEach(countryData => {
let data = countriesData
if (typeof filter === 'function') {
data = data.filter(filter)
}
data.forEach(countryData => {
let collectionObject = {}

@@ -36,0 +42,0 @@ for (const field in fields) {

2

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

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

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