1.0.0 • Published 1 month ago

@npmtuanmap2024/commodi-neque-veritatis v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@npmtuanmap2024/commodi-neque-veritatis

Travis CI Codecov npm npm version npm dependencies npm dev dependencies

🔎 Get the OpenStreetMap relation id from a country code.

Install

$ npm install --save @npmtuanmap2024/commodi-neque-veritatis

Usage

const osmCountries = require('@npmtuanmap2024/commodi-neque-veritatis');

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.

ParamTypeDescription
codestringAlpha-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.

1.0.0

1 month ago