New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

capitals-coordinates

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capitals-coordinates

List of GPS coordinates of capital cities of world taken from tripmondo.com

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Capitals coordinates

rawData

const coordinates = require('capitals-coordinates').rawData;

coordinates is array of GeoJSON objects sorted by country name in English. Example GeoJSON object:

{
     "type": "Feature",
     "geometry": {
      "type": "Point",
      "coordinates": [
       31.05,
       -17.83
      ]
     },
     "properties": {
      "capital": "Harare",
      "country": "Zimbabwe",
      "continent": "africa"
     }
    }

Continents

Possible values for continent: ['north-america', 'oceania', 'south-america', 'europe', 'asia', 'africa'].

findByCountryMatch(regexp)

const countries = require('capitals-coordinates')
    .findByCountryMatch(/and/i); // array of GeoJSON with `properties`

findByContinent

const africanCountries = require('capitals-coordinates')
    .findByContinent('africa');

eu28

Method .eu28() return list of EU countries (updated: December 2016).

Why did you make it?

We use this module to discover countries supported by various API - eg. we are working application working with AwesomeHotelBookings . They claim to provide hotel booking "Europe-wide", though they lie - they don't provide such services in Norway, so we won't advertise app in Norway.

Keywords

capitals

FAQs

Package last updated on 12 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts