Gathering detailed insights and metrics for @mr-mkz/atlas
Gathering detailed insights and metrics for @mr-mkz/atlas
Atlas is a library that gives you region, subregion, country, state and city names.
npm install @mr-mkz/atlas
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
317
Last Day
2
Last Week
6
Last Month
59
Last Year
317
2 Stars
22 Commits
1 Watching
1 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
1.2.0
Package Id
@mr-mkz/atlas@1.2.0
Unpacked Size
36.12 MB
Size
3.12 MB
File Count
17
NPM Version
10.8.1
Node Version
20.15.0
Publised On
07 Aug 2024
Cumulative downloads
Total Downloads
Last day
100%
2
Compared to previous day
Last week
-40%
6
Compared to previous week
Last month
1,080%
59
Compared to previous month
Last year
0%
317
Compared to previous year
1
Atlas is a library that gives you region, subregion, country, state and city names with some special information if you want.
Install AtlasJs libary with npm
1 npm install @mr-mkz/atlas
1 getAllRegions()
This function returns an object that contains list of all regions.
1 getSubRegions()
Parameter | Type | Description |
---|---|---|
region | string | Required. name of region to get subregions |
This function return subregions of a region.
1 getAllCountries()
Parameter | Type | Description |
---|---|---|
currency | boolean | do you want currency of country? |
dialCode | boolean | do you want dial code of country? |
native | boolean | do you want native of country? |
nationality | boolean | do you want nationality of country? |
region | boolean | do you want region of country? |
subregion | boolean | do you want subregion of country? |
translations | boolean | do you want translations of country? |
timezones | boolean | do you want timezones of country? |
geolocation | boolean | do you want geolocation of country? |
emojies | boolean | do you want emojies of country? |
domain | boolean | do you want domain of country? |
This function gives you list of countries with some special information.
1 getCountryStates()
Parameter | Type | Description |
---|---|---|
country | string | Required. country name |
iso3 | string | Required. country iso3 |
iso2 | string | Required. country iso2 |
geolocation | boolean | do you want geolocation of each country state? |
Tip: country name, iso3 or iso2, at least one of them is required!
This function gives you states of a country.
1 getStateCities()
Parameter | Type | Description |
---|---|---|
country | string | Required. country name |
state | string | Required. state name to get cities |
geolocation | boolean | do you want geolocation of each country state? |
This function gives you cities of a state.
1import { 2 getAllCountries, 3 getAllRegions, 4 getSubRegions, 5 getCountryStates, 6 getStateCities 7} from "@mr-mkz/atlas"; 8 9// Returns list of all regions. 10getAllRegions().then((regions) => { 11 console.log(regions); 12}).catch((error) => { 13 console.log(error); 14}) 15 16// Returns list of subregions for Asia region. 17getSubRegions("Asia").then((subregions) => { 18 console.log(subregions); 19}).catch((error) => { 20 console.log(error); 21}) 22 23// Returns list of all countries. 24getAllCountries().then((countries) => { 25 console.log(countries); 26}).catch((error) => { 27 console.log(error); 28}) 29 30// Returns list of states for Iran. 31getCountryStates("iran", "", "", true).then((states) => { 32 console.log(states); 33}).catch((error) => { 34 console.log(error); 35}) 36 37getCountryStates("", "IRN", "", true).then((states) => { 38 console.log(states); 39}).catch((error) => { 40 console.log(error); 41}) 42 43getCountryStates("", "", "IR", true).then((states) => { 44 console.log(states); 45}).catch((error) => { 46 console.log(error); 47}) 48 49// Returns list of cities for Razavi Khorasan state of Iran. 50getStateCities("iran", "razavi khorasan", true).then((cities) => { 51 console.log(cities); 52}).catch((error) => { 53 console.log(error); 54})
No vulnerabilities found.
No security vulnerabilities found.