laika-locations
TypeScript icon, indicating that this package has built-in type declarations

1.3.5 • Public • Published

laika-locations

Installation

npm install laika-locations --save

Usage

TypeScript

import { getCitiesByCountry, getCountries } from 'laika-locations';
console.log(getCountries());
// returns
{
    "countries"[
        {
            "id":1,
            "name":"Macedonia",
            "iso":"MK"
        },
        {
            "id":2,
            "name":"Croatia",
            "iso":"HR"},
        {
            "id":3,
            "name":"Bulgaria",
            "iso":"BG"},
        {
            "id":4,
            "name":"Serbia",
            "iso":"RS"
        }
    ]
} 
console.log(getCitiesByCountry(1));
[ { id: 1, countryId: 1, name: 'Skopje' },
  { id: 2, countryId: 1, name: 'Arachinovo' },
  { id: 3, countryId: 1, name: 'Ohrid' },
  { id: 4, countryId: 1, name: 'Kumanovo' },
  { id: 5, countryId: 1, name: 'Tetovo' },
  { id: 6, countryId: 1, name: 'Bitola' },
  { id: 7, countryId: 1, name: 'Prilep' },
  { id: 8, countryId: 1, name: 'Veles' },
  ......
]

Package Sidebar

Install

npm i laika-locations

Weekly Downloads

2

Version

1.3.5

License

ISC

Unpacked Size

785 kB

Total Files

7

Last publish

Collaborators

  • microtica-org