1.0.6-b • Published 4 years ago

filterbycities v1.0.6-b

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

filterByCities

Simple function that use data from https://github.com/datasets/world-cities

Usage

Javascript

const { filterByName } = require("filterbycities");
console.log(filterByName('Bangk'));
[{
    "name": "Tanjung Pandan",
    "country": "Indonesia",
    "subcountry": "Bangka–Belitung Islands",
    "geonameid": 1624877
  },
  ...
  ]

TypeScript

import { filterByName } from 'filterbycities';
console.log(filterByName('Bangk'));
[{
    "name": "Tanjung Pandan",
    "country": "Indonesia",
    "subcountry": "Bangka–Belitung Islands",
    "geonameid": 1624877
  },
  ...
  ]

##Warning This code will load the cities.json directly which is 2 MB if you want to do lazy loading please avoid this code

1.0.6-b

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago