Gathering detailed insights and metrics for country-cities
Gathering detailed insights and metrics for country-cities
Gathering detailed insights and metrics for country-cities
Gathering detailed insights and metrics for country-cities
country-state-city
Library for fetching Country, its States and Cities
country-cities-random
Random of Country and it's Cities
pangnote-cities
Country & City Names, including coordinates (Lat, Lng) + country ISO name and full name
country-state-cities-module
Provides a list of Countries States and cities in form of a JSON Array
npm install country-cities
Typescript
Module System
Node Version
NPM Version
80.4
Supply Chain
99.6
Quality
75.8
Maintenance
100
Vulnerability
100
License
TypeScript (93.9%)
JavaScript (6.1%)
Total Downloads
10,686
Last Day
1
Last Week
196
Last Month
860
Last Year
6,639
NOASSERTION License
8 Stars
16 Commits
2 Watchers
2 Branches
1 Contributors
Updated on Sep 17, 2024
Minified
Minified + Gzipped
Latest Version
1.0.8
Package Id
country-cities@1.0.8
Unpacked Size
52.16 MB
Size
4.87 MB
File Count
33
NPM Version
8.19.4
Node Version
16.20.0
Published on
Jun 14, 2023
Cumulative downloads
Total Downloads
Last Day
-80%
1
Compared to previous day
Last Week
25.6%
196
Compared to previous week
Last Month
2.5%
860
Compared to previous month
Last Year
64%
6,639
Compared to previous year
country-cities
npm i country-cities
Countries
import { countries } from "country-cities"
All of Countries
1countries.all()
1[ 2 { 3 "isoCode": "US", 4 "name": "United State", 5 "phonecode": "1", 6 "flag": "🇺🇸", 7 "currency": "USD", 8 "latitude": "38.00000000", 9 "longitude": "-97.00000000", 10 "timezones": [ 11 { 12 "zoneName": "America/Adak", 13 "gmtOffset": -36000, 14 "gmtOffsetName": "UTC-10:00", 15 "abbreviation": "HST", 16 "tzName": "Hawaii–Aleutian Standard Time" 17 }, 18 { 19 "zoneName": "America/Kentucky/Louisville", 20 "gmtOffset": -18000, 21 "gmtOffsetName": "UTC-05:00", 22 "abbreviation": "EST", 23 "tzName": "Eastern Standard Time (North America)" 24 }, 25 ... 26 ] 27 }, 28 { 29 "isoCode": "FR", 30 "name": "France", 31 "phonecode": "33", 32 "flag": "🇫🇷", 33 "currency": "EUR", 34 "latitude": "46.00000000", 35 "longitude": "2.00000000", 36 "timezones": [ 37 { 38 "zoneName": "Europe/Paris", 39 "gmtOffset": 3600, 40 "gmtOffsetName": "UTC+01:00", 41 "abbreviation": "CET", 42 "tzName": "Central European Time" 43 } 44 ] 45 } 46]
Get country by its code
1countries.getByCode("US")
1{ 2 "isoCode": "US", 3 "name": "United State", 4 "phonecode": "1", 5 "flag": "🇺🇸", 6 "currency": "USD", 7 "latitude": "38.00000000", 8 "longitude": "-97.00000000", 9 "timezones": [ 10 { 11 "zoneName": "America/Adak", 12 "gmtOffset": -36000, 13 "gmtOffsetName": "UTC-10:00", 14 "abbreviation": "HST", 15 "tzName": "Hawaii–Aleutian Standard Time" 16 }, 17 { 18 "zoneName": "America/Kentucky/Louisville", 19 "gmtOffset": -18000, 20 "gmtOffsetName": "UTC-05:00", 21 "abbreviation": "EST", 22 "tzName": "Eastern Standard Time (North America)" 23 }, ... 24 ] 25}
States
import { states } from "country-cities"
All of States in the world
1states.all()
1[ 2 { 3 countryCode: "US", 4 isoCode: "VA", 5 latitude: "37.43157340", 6 longitude: "-78.65689420", 7 name: "Virginia" 8 }, 9 { 10 countryCode: "US", 11 isoCode: "IL", 12 latitude: "40.63312490", 13 longitude: "-89.39852830", 14 name: "Illinois" 15 }, 16 ... 17]
Get States by Country
1states.getByCountry("US")
1[ 2 { 3 countryCode: "US", 4 isoCode: "VA", 5 latitude: "37.43157340", 6 longitude: "-78.65689420", 7 name: "Virginia" 8 }, 9 { 10 countryCode: "US", 11 isoCode: "IL", 12 latitude: "40.63312490", 13 longitude: "-89.39852830", 14 name: "Illinois" 15 }, 16 ... 17]
Get State by Code
1states.getByCode("VA", "US")
Important: The country code should be entered second parameter
1 2{ 3 countryCode: "US", 4 isoCode: "VA", 5 latitude: "37.43157340", 6 longitude: "-78.65689420", 7 name: "Virginia" 8},
Cities
import { cities } from "country-cities"
All of Cities
cities.all()
1[ 2 { 3 countryCode: "AU", 4 latitude: "-31.12756000", 5 longitude: "150.90711000", 6 name: "Hillvue", 7 stateCode: "NSW", 8 }, 9 { 10 countryCode: "AU", 11 latitude: "-33.91878000", 12 longitude: "150.86314000", 13 name: "Hinchinbrook", 14 stateCode: "NSW", 15 }, 16 ... 17]
Get Cities by Country
1cities.getByCountry("AU")
1[ 2 { 3 countryCode: "AU", 4 latitude: "-31.12756000", 5 longitude: "150.90711000", 6 name: "Hillvue", 7 stateCode: "NSW", 8 }, 9 { 10 countryCode: "AU", 11 latitude: "-33.91878000", 12 longitude: "150.86314000", 13 name: "Hinchinbrook", 14 stateCode: "NSW", 15 }, 16 ... 17]
Get Cities by State and Country
1cities.getByState("NSW", "AU")
Important: The country code should be entered second parameter
1[ 2 { 3 countryCode: "AU", 4 latitude: "-31.12756000", 5 longitude: "150.90711000", 6 name: "Hillvue", 7 stateCode: "NSW", 8 }, 9 { 10 countryCode: "AU", 11 latitude: "-33.91878000", 12 longitude: "150.86314000", 13 name: "Hinchinbrook", 14 stateCode: "NSW", 15 }, 16 ... 17]
No vulnerabilities found.
No security vulnerabilities found.