JSPM

osm-countries

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q29824F
  • License MIT

Get the OSM relation id from a country code.

Package Exports

  • osm-countries

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (osm-countries) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

osm-countries

Travis CI Codecov npm npm version npm dependencies npm dev dependencies

🔎 Get the OSM relation id from a country code.

Install

$ npm install --save osm-countries

Usage

const osmCountries = require('osm-countries');

osmCountries.get('ITA');
// => '365331'

osmCountries.get('USA');
// => '148838'

API

get(code) ⇒ string

Converts an alpha-3 iso 3166-1 code to its corrispective relation id on OSM.

Returns: string - OSM relation id of the given country.

Param Type Description
code string Alpha-3 iso 3166-1 country code.

map() ⇒ object

Returns a map from alpha-3 iso 3166-1 codes to theyr corrispective relation ids on OSM.

Returns: object - Map of all OSM relation ids.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.