Socket
Socket
Sign inDemoInstall

country-data

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-data - npm Package Compare versions

Comparing version 0.0.30 to 0.0.31

8

CHANGES.md
# Changes
## v0.0.31
* fixed deleted countries appearing in countries[alpha2] instead of the current active country - thanks @silverwind
## v0.0.30
* Added emoji flags for countries - thanks @livedo
## v0.0.29

@@ -4,0 +12,0 @@

12

index.js

@@ -21,4 +21,12 @@ 'use strict';

_.each(countriesAll, function (country) {
exports.countries[country.alpha2] = country;
exports.countries[country.alpha3] = country;
// prefer assigned country codes over inactive ones
var exportedAlpha2 = exports.countries[country.alpha2];
if (!exportedAlpha2 || exportedAlpha2.status === 'deleted') {
exports.countries[country.alpha2] = country;
}
var exportedAlpha3 = exports.countries[country.alpha3];
if (!exportedAlpha3 || exportedAlpha3.status === 'deleted') {
exports.countries[country.alpha3] = country;
}
});

@@ -25,0 +33,0 @@

2

package.json
{
"name": "country-data",
"version": "0.0.30",
"version": "0.0.31",
"description": "Data about countries - like their ISO codes and currencies",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/OpenBookPrices/country-data",

@@ -22,2 +22,6 @@ 'use strict';

});
it('should prefer assigned alpha2 country codes', function () {
assert.equal( countries.SK.name, 'Slovakia');
assert.equal( countries.BY.name, 'Belarus');
});
});

@@ -24,0 +28,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