New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

country-city-search

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country-city-search - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

23

package.json
{
"name": "country-city-search",
"description": "The process of accessing and utilizing country and city information programmatically, making it a valuable tool for developers working with geographic data in their projects.",
"version": "1.0.1",
"version": "1.0.2",
"main": "./dist/index.js",

@@ -18,3 +18,22 @@ "module": "./dist/index.mjs",

"keywords": [
"test"
"Country-city-search",
"Country city search",
"City search by country",
"Country search by city",
"Geographic search",
"Location lookup",
"City finder",
"Country finder",
"City data API",
"Country data API",
"City and country database",
"Location database",
"Geography search tool",
"City-country mapping",
"Country-city mapping",
"City list by country",
"Country list by city",
"World cities search",
"International cities search",
"Country lookup"
],

@@ -21,0 +40,0 @@ "author": "Dharmesh pal",

@@ -19,2 +19,4 @@ # Country-City-Search

- Search city by it's name
Get Country details by using country code
Get All states from the country by using country code
- Cross platform usable for frontend and backend

@@ -67,3 +69,3 @@

/*
Output :
Output :
[{

@@ -112,2 +114,76 @@ "id": "57588",

//------------------------------------------------------------
//Get country by its Country code
const country = await getCountryByCode("IN");
/*
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: "भारत",
region: "Asia",
region_id: "3",
subregion: "Southern Asia",
subregion_id: "14",
nationality: "Indian",
timezones: [...],
translations: {....},
latitude: "20.00000000",
longitude: "77.00000000",
emoji: "🇮🇳",
emojiU: "U+1F1EE U+1F1F3",
}
];
*/
//------------------------------------------------------------
//Get All States List from the country code
const state = await getStatesOfCountry("IN");
/* Output :
[
{
"id": 4023,
"name": "Andaman and Nicobar Islands",
"state_code": "AN",
"latitude": "11.74008670",
"longitude": "92.65864010",
"type": "Union territory"
} ....]
*/
//------------------------------------------------------------
//Get All States List from the country code
const cityies = await getAllCitiesOfState("BDS");
/* Output :
[
{
"id": "52",
"name": "Ashkāsham",
"state_id": "3901",
"state_code": "BDS",
"state_name": "Badakhshan",
"country_id": "1",
"country_code": "AF",
"country_name": "Afghanistan",
"latitude": "36.68333000",
"longitude": "71.53333000",
"wikiDataId": "Q4805192",
"time_zone_name": "Asia/Kabul",
"emoji": "🇦🇫",
"currency_symbol": "؋"
}....]
*/
};

@@ -114,0 +190,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc