![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
🌏 Worldpedia is javascript library that will give you access to data of Continents, Subregions, Country, States & Cities
“Worldpedia” is javascript library that will give you access to data of Continents, Subregions, Country, States & Cities
Find project documentation here
Demo link Worldpedia-Demo
npm i worldpedia
import { City, Continent, Country, State, Subregion } from 'worldpedia';
Following functions are available in the continent module
This function returns all the available continents
Type: IContinent[ ]
Output:
[
{
"code": "AF",
"name": "Africa"
},
{
"code": "AN",
"name": "Antarctica"
},
{
"code": "AS",
"name": "Asia"
},
{
"code": "EU",
"name": "Europe"
},
{
"code": "NA",
"name": "North america"
},
{
"code": "OC",
"name": "Oceania"
},
{
"code": "SA",
"name": "South america"
}
]
This function accept continentCode
as a parameter and return the single instance of IContienent
matching with the parameter
Type: IContinent | undefined
Output:
{
"code": "AS",
"name": "Asia"
}
Following function are available in the subregion module
This function returns all the subregions
Type: ISubregion[] | []
Output:
[
{
"name": "Southern Asia",
"continent": "Asia",
"continent_code": "AS"
},
{
"name": "Northern Europe",
"continent": "Europe",
"continent_code": "EU"
},
...
]
This function accepts the continentCode
as a parameter and returns the list of all subregions belonging to the continentCode
Type: ISubregions[] | []
Output:
[
{
"name": "Southern Asia",
"continent": "Asia",
"continent_code": "AS"
},
{
"name": "Western Asia",
"continent": "Asia",
"continent_code": "AS"
},
{
"name": "South-eastern Asia",
"continent": "Asia",
"continent_code": "AS"
},
{
"name": "Eastern Asia",
"continent": "Asia",
"continent_code": "AS"
},
{
"name": "Central Asia",
"continent": "Asia",
"continent_code": "AS"
}
]
Following function are available in the country module
This function returns all the countries
Type: ICountry[] | []
Output:
[
{
"id": 1,
"name": "Afghanistan",
"iso3": "AFG",
"iso2": "AF",
"numeric_code": "004",
"phone_code": "93",
"capital": "Kabul",
"currency": "AFN",
"currency_name": "Afghan afghani",
"currency_symbol": "؋",
"tld": ".af",
"native": "افغانستان",
"subregion": "Southern Asia",
"timezones": [
{
"zoneName": "Asia/Kabul",
"gmtOffset": 16200,
"gmtOffsetName": "UTC+04:30",
"abbreviation": "AFT",
"tzName": "Afghanistan Time"
}
],
"translations": {
"kr": "아프가니스탄",
"br": "Afeganistão",
"pt": "Afeganistão",
"nl": "Afghanistan",
"hr": "Afganistan",
"fa": "افغانستان",
"de": "Afghanistan",
"es": "Afganistán",
"fr": "Afghanistan",
"ja": "アフガニスタン",
"it": "Afghanistan",
"cn": "阿富汗"
},
"latitude": "33.00000000",
"longitude": "65.00000000",
"emoji": "🇦🇫",
"emojiU": "U+1F1E6 U+1F1EB",
"continent": "Asia",
"continent_code": "AS"
}
...
]
This function accept country code as a parameter and return the single instance of ICountry
matching with the parameter
Type: ICountry | undefined
Output:
{
"name": "India",
"iso3": "IND",
"iso2": "IN",
"numeric_code": "356",
"phone_code": "91",
"capital": "New Delhi",
"currency": "INR",
"currency_name": "Indian rupee",
"currency_symbol": "₹",
"tld": ".in",
"native": "भारत",
"subregion": "Southern Asia",
"timezones": [
{
"zoneName": "Asia/Kolkata",
"gmtOffset": 19800,
"gmtOffsetName": "UTC+05:30",
"abbreviation": "IST",
"tzName": "Indian Standard Time"
}
],
"translations": {
"kr": "인도",
"br": "Índia",
"pt": "Índia",
"nl": "India",
"hr": "Indija",
"fa": "هند",
"de": "Indien",
"es": "India",
"fr": "Inde",
"ja": "インド",
"it": "India",
"cn": "印度"
},
"latitude": "20.00000000",
"longitude": "77.00000000",
"emoji": "🇮🇳",
"emojiU": "U+1F1EE U+1F1F3",
"continent": "Asia",
"continent_code": "AS"
}
This function accept continent code as a parameter and return all countries of the continents
Type: ICountry[] | []
This function accept subregion name as a parameter and return all countries of the subregion
Type: ICountry[] | []
Following function are available in the state module
This function returns all the states
Type: IState[] | []
This function accept country code as a parameter and return all states of the country
Type: IState[] | []
This function accept state iso code and country code as a parameter and return the single instance of the IState
Type: IState | undefined
Output:
{
"name": "Maharashtra",
"isoCode": "MH",
"countryCode": "IN",
"latitude": "19.75147980",
"longitude": "75.71388840"
}
Following function are available in the city module
This function returns all the cities
Type: ICity[] | []
This function accept state Code and country code as a parameter and return all cities of the states.
Type: ICity[] | []
This function accept country code as a parameter and return all cities of the country.
Type: ICity[] | []
Output:
[
{
name: 'Achalpur',
countryCode: 'IN',
stateCode: 'MH',
latitude: '21.25665000',
longitude: '77.51006000'
},
{
name: 'Ahiri',
countryCode: 'IN',
stateCode: 'MH',
latitude: '19.41386000',
longitude: '80.00359000'
},
{
name: 'Ahmadnagar',
countryCode: 'IN',
stateCode: 'MH',
latitude: '19.09457000',
longitude: '74.73843000'
}
...
]
$ git checkout https://github.com/meswapnilwagh/worldpedia -b branch-name
For any data related issue, you can raise a Issue here.
Swapnil Abhimanyu Wagh
FAQs
🌏 Worldpedia is javascript library that will give you access to data of Continents, Subregions, Country, States & Cities
The npm package worldpedia receives a total of 21 weekly downloads. As such, worldpedia popularity was classified as not popular.
We found that worldpedia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.