1.0.3 • Published 10 months ago

vk-country-state-city v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Installation

$ npm i vk-country-state-city

Usage

import {getCountries, getStates, getCities} from "vk-country-state-city"

const main = async () => {
    const countries = await getCountries()
    const country = countries[0].name
    console.log(country) // Eg: [{name:"India",iso2:"IN",iso3:"IND"}]

    const states = await getStates(country)
    const state = states[0].name
    console.log(state) // Eg: [{name:"Kerala",code:"KL"}]

    const cities = await getCities(country, state)
    console.log(cities) // Eg: ["kozhikode"]
}

main()
1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago