Gathering detailed insights and metrics for world-information
Gathering detailed insights and metrics for world-information
Gathering detailed insights and metrics for world-information
Gathering detailed insights and metrics for world-information
@serenityjs/world
This package contains the basic behavior for Worlds within SerenityJS. Worlds are handled by WorldProviders, in which they handle the loading/saving world information such as Dimension Chunks. World Dimensions hold a TerrianGenerator property, in which th
world
Retrieve country information from local system.
world-currencies
Currency information in JSON
world-info
Npm library to fetch information about any country
world-information is a comprehensive npm package designed to provide detailed geographical information. It includes data on continents, countries, states, and cities, making it an essential tool for applications that require location-based data.
npm install world-information
Typescript
Module System
Node Version
NPM Version
76.5
Supply Chain
98.7
Quality
80.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
740
Last Day
2
Last Week
2
Last Month
22
Last Year
740
1 Stars
30 Commits
1 Watchers
2 Branches
1 Contributors
Updated on Aug 14, 2024
Minified
Minified + Gzipped
Latest Version
0.0.7
Package Id
world-information@0.0.7
Unpacked Size
257.86 kB
Size
42.50 kB
File Count
6
NPM Version
10.7.0
Node Version
20.15.1
Published on
Aug 09, 2024
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
100%
2
Compared to previous week
Last Month
-42.1%
22
Compared to previous month
Last Year
0%
740
Compared to previous year
No dependencies detected.
npm install world-information
Continent array
Country array
State array
getCountryByContinentName(continentName);
getStateByCountryName(countryName);
Cities
getCitiesByStateName(stateName);
1const worldInformation = require('world-information'); 2 3// Get a list of continents 4const continents = worldInformation.continentList; 5console.log(continents); 6 7// Output: 8[ 9 { name: 'Africa', code: 'AF' }, 10 { name: 'Antarctica', code: 'AN' }, 11 { name: 'Asia', code: 'AS' }, 12 { name: 'Europe', code: 'EU' }, 13 { name: 'North America', code: 'NA' }, 14 { name: 'Oceania', code: 'OC' }, 15 { name: 'South America', code: 'SA' } 16]
1const worldInformation = require('world-information'); 2 3// Get a list of countries 4const countries = worldInformation.countryList; 5console.log(countries); 6 7// Output (sample): 8 [ 9 { "name": "Afghanistan", "alpha-2": "AF", "alpha-3": "AFG", "numeric": "004", "continent": "Asia", "phoneCode": "+93" }, 10 { "name": "Albania", "alpha-2": "AL", "alpha-3": "ALB", "numeric": "008", "continent": "Europe", "phoneCode": "+355" }, 11 ... 12 { "name": "Zimbabwe", "alpha-2": "ZW", "alpha-3": "ZWE", "numeric": "716", "continent": "Africa", "phoneCode": "+263" } 13 ]
1const {getCountryByContinentName} = require("world-information"); 2 3// Get a list of countries in asia continent 4/* 5Make sure the argument name is one of the below continent. 6I have also configured the JSDoc Annotations, So you will get the suggestions too. 7The argument value(continent name) is case insensitive. 8'Africa' | 'Antarctica' | 'Asia' | 'Europe' | 'North America' | 'Oceania' | 'South America' 9*/ 10const asianCountries = getCountryByContinentName("Asia"); 11console.log(asianCountries); 12 13// Output (sample): 14[ 15{ "name": "Afghanistan", "alpha-2": "AF", "alpha-3": "AFG", "numeric": "004", "continent": "Asia", "phoneCode": "+93" }, 16... 17{ "name": "Yemen", "alpha-2": "YE", "alpha-3": "YEM", "numeric": "887", "continent": "Asia", "phoneCode": "+967" }, 18]
1const {getStateByCountryName} = require("world-information"); 2 3/* 4Make sure the argument name is one of the below country. 5I have also configured the JSDoc Annotations, So you will get the suggestions too. 6The argument value(country name) is case insensitive. 7'Afghanistan' | 'Albania' | 'Algeria' | 'Andorra' | 'Angola' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Australia' | 'Austria' | 'Azerbaijan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bhutan' | 'Bolivia' | 'Bosnia and Herzegovina' | 'Botswana' | 'Brazil' | 'Brunei' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cabo Verde' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Colombia' | 'Comoros' | 'Congo' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Eswatini' | 'Ethiopia' | 'Fiji' | 'Finland' | 'France' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Greece' | 'Grenada' | 'Guatemala' | 'Guinea' | 'Guinea-Bissau' | 'Guyana' | 'Haiti' | 'Honduras' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Korea, North' | 'Korea, South' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Mauritania' | 'Mauritius' | 'Mexico' | 'Micronesia' | 'Moldova' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'North Macedonia' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Poland' | 'Portugal' | 'Qatar' | 'Romania' | 'Russia' | 'Rwanda' | 'Saint Kitts and Nevis' | 'Saint Lucia' | 'Saint Vincent and the Grenadines' | 'Samoa' | 'San Marino' | 'Sao Tome and Principe' | 'Saudi Arabia' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovakia' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Sudan' | 'Spain' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Sweden' | 'Switzerland' | 'Syria' | 'Taiwan' | 'Tajikistan' | 'Tanzania' | 'Thailand' | 'Timor-Leste' | 'Togo' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Tuvalu' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City' | 'Venezuela' | 'Vietnam' | 'Yemen' | 'Zambia' | 'Zimbabwe' 8*/ 9// Get a list of states in india 10const indianStates = getStateByCountryName("India"); 11console.log(indianStates); 12 13// Output (sample) 14[ 15{name: 'Andhra Pradesh', code: 'IN-AP', country: 'India'}, 16{name: 'Arunachal Pradesh', code: 'IN-AR', country: 'India'}, 17... 18{name: 'Puducherry', code: 'IN-PY', country: 'India'} 19]
Contributions are welcome! Please open an issue or submit a pull request on GitHub to help improve this package. ♥♥♥
No vulnerabilities found.
No security vulnerabilities found.