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.11 to 0.0.12

lookup.js

4

CHANGES.md
# Changes
## v0.0.12
* @bebrow contributed `lookup()`
## v0.0.11

@@ -4,0 +8,0 @@

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

@@ -25,1 +26,5 @@

exports.regions = regions;
exports.lookup = lookup({
countries: countriesAll,
currencies: currenciesAll
});

5

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

@@ -26,3 +26,4 @@ "homepage": "https://github.com/OpenBookPrices/country-data",

"csv": "~0.2.9",
"mocha": "~1.9.0"
"mocha": "~1.9.0",
"chai": "~1.8.1"
},

@@ -29,0 +30,0 @@ "dependencies": {

@@ -42,3 +42,7 @@ # Country Data

## Lookup
To make finding easier there are utility methods that can search the countries and currencies. See examples below.
## Installing

@@ -73,2 +77,12 @@

``` javascript
var lookup = require('country-data').lookup;
// Match a value (grab first from array)
var france = lookup.countries({name: 'France'})[0];
// Or match one of several possible values.
var eurozone_countries = lookup.countries({currencies: 'EUR'});
```
It is very simple for now - feel free to contribute more helpful accessors.

@@ -75,0 +89,0 @@

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