country-data
Advanced tools
Comparing version 0.0.8 to 0.0.9
# 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 @@ |
@@ -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; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
141088
20
4894
139