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.8 to 0.0.9

data/regions.js

6

CHANGES.md
# Changes
## v0.0.9
* Added `country-data.regions`
* Added South Sudan
* Added proper accents to São Tomé and Príncipe
## v0.0.8

@@ -4,0 +10,0 @@

15

data/countries.json

@@ -2776,2 +2776,15 @@ [

{
"alpha2": "SS",
"alpha3": "SSD",
"countryCallingCodes": [
"+211"
],
"currencies": [
"SSP"
],
"ioc": "",
"name": "South Sudan",
"status": "assigned"
},
{
"alpha2": "ST",

@@ -2786,3 +2799,3 @@ "alpha3": "STP",

"ioc": "STP",
"name": "Sao Tome And Principe",
"name": "São Tomé and Príncipe",
"status": "assigned"

@@ -2789,0 +2802,0 @@ },

var countriesAll = require('./data/countries.json'),
currenciesAll = require('./data/currencies.json'),
_ = require('underscore');
regions = require('./data/regions'),
_ = require('underscore');

@@ -21,1 +22,4 @@ exports.countries = {

});
exports.regions = regions;

2

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

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

@@ -27,2 +27,8 @@ # Country Data

## Regions
Countries are ofter grouped into regions. The list of regions is by no means exhaustive, pull requests very welcome for additions.
* `countries` An array of `alpha2` codes for the countries in this region.
## Currencies

@@ -49,3 +55,4 @@

var countries = require('country-data').countries,
currencies = require('country-data').currencies;
currencies = require('country-data').currencies,
regions = regions('country-data').regions;

@@ -62,2 +69,5 @@ // .all gives you an array of all entries

console.log( currencies.USD.name ); // 'United States dollar'
// regions are accessed using a camel case name
console.log( regions.europe.countries )
```

@@ -109,7 +119,6 @@

# Edit the countries.csv
open countries.csv
open data/countries.csv
# Convert the CSV to JSON
node data/country_csv_to_json.js > data/countries.json
node data/currency_csv_to_json.js > data/currencies.json
# Convert the raw data (CSV or JS files) to JSON
make

@@ -116,0 +125,0 @@ # Run the tests

Sorry, the diff of this file is not supported yet

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