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

country-query

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country-query - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

10

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased][unreleased]
## [0.3.0] - 2016-06-02
### Added
- Added `findByCioc()` function (Thanks [zakjan](https://github.com/zakjan)!).
### Changed
- Updated to version 1.7.8 of the world-countries data.
### Removed
- Removed `findByRelevance()` function as the `relevance` parameter no longer exists in the world-countries data.
## [0.2.0] - 2015-03-29

@@ -7,0 +15,0 @@ ### Added

18

lib/country-query.js

@@ -26,4 +26,4 @@ var _ = require('lodash')

'cca3': PROP_TYPE_STRING,
'cioc': PROP_TYPE_STRING,
'capital': PROP_TYPE_STRING,
'relevance': PROP_TYPE_STRING,
'region': PROP_TYPE_STRING,

@@ -116,2 +116,9 @@ 'subregion': PROP_TYPE_STRING,

/**
* Find country by 3-letter International Olympic Commitee country code.
* @param {string} cioc
* @return {mixed} See #find()
*/
, findByCioc: function(cioc) { return this.find('cioc', cioc) }
/**
* Find country by numeric country code.

@@ -180,9 +187,2 @@ * @param {string} ccn3

/**
* Find country by 'relevance'.
* @param {string} relevance
* @return {mixed} See #find()
*/
, findByRelevance: function(relevance) { return this.find('relevance', relevance) }
/**
* Find country by subregion it is located in.

@@ -312,2 +312,2 @@ * @param {string} subregion

module.exports = CountryQuery
module.exports = CountryQuery
{
"name": "country-query",
"version": "0.2.0",
"version": "0.3.0",
"description": "A javascript query API for world-countries data",

@@ -19,3 +19,3 @@ "repository": {

"lodash-deep": "^1.6.0",
"world-countries": "^1.7.0"
"world-countries": "^1.7.8"
},

@@ -22,0 +22,0 @@ "devDependencies": {

@@ -42,2 +42,3 @@ # country-query

"cca3": "AUT",
"cioc": "AUT",
"currency": ["EUR"],

@@ -47,3 +48,2 @@ "callingCode": ["43"],

"altSpellings": ["AT", "Osterreich", "Oesterreich"],
"relevance": "0",
"region": "Europe",

@@ -90,3 +90,2 @@ "subregion": "Western Europe",

- `capital`
- `relevance`
- `region`

@@ -194,8 +193,2 @@ - `subregion`

### findByRelevance(relevance)
Find country by 'relevance'.
Return value is the same as [find](#findby-value).
### findBySubregion(subregion)

@@ -202,0 +195,0 @@

@@ -13,2 +13,3 @@ var expect = require('chai').expect

expect(CountryQuery.find('cca2', 'AT')).to.have.property('cca3', 'AUT')
expect(CountryQuery.find('cioc', 'RUS')).to.have.property('cca3', 'RUS')
})

@@ -20,3 +21,3 @@

expect(caribCountries).to.be.an('array').and.have.length(28)
expect(caribCountries).to.be.an('array').and.have.length(27)
expect(caribCountries).to.include(aruba)

@@ -98,2 +99,3 @@ })

, {field: 'ccn3', value: '056' , findFunc: 'findByCcn3', expectCca3: 'BEL'}
, {field: 'cioc', value: 'RWA' , findFunc: 'findByCioc', expectCca3: 'RWA'}
, {field: 'demonym', value: 'Qatari' , findFunc: 'findByDemonym', expectCca3: 'QAT'}

@@ -120,5 +122,4 @@ , {field: 'languages', value: 'Azerbaijani' , findFunc: 'findByLanguage', expectCca3: 'AZE'}

, {field: 'landlocked', value: true , findFunc: 'findByLandlocked', expectLength: 45}
, {field: 'region', value: 'Africa' , findFunc: 'findByRegion', expectLength: 59}
, {field: 'relevance', value: '0.5' , findFunc: 'findByRelevance', expectLength: 36}
, {field: 'subregion', value: 'Western Africa' , findFunc: 'findBySubregion', expectLength: 17}
, {field: 'region', value: 'Africa' , findFunc: 'findByRegion', expectLength: 58}
, {field: 'subregion', value: 'Western Africa' , findFunc: 'findBySubregion', expectLength: 16}
]

@@ -125,0 +126,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