@xinnovations/atlas
v1.0.3
Published
A comprehensive world atlas package providing data on countries, states, and cities.
Downloads
46
Maintainers
Readme
@xinnovations/atlas
A modern, type-safe TypeScript library for World countries, states, and cities with zero dependencies.
Features
- 🎯 TypeScript First - Full type safety with comprehensive type definitions
- 📦 Zero Dependencies - Lightweight and fast
- 🌍 Global Data - Countries, states, and cities worldwide
- 🔍 Powerful Search - Find locations by fuzzy search
- ✅ Well Tested - Verified reliability
Installation
npm install @xinnovations/atlasQuick Start
import { getStates, getCities, searchCountries } from '@xinnovations/atlas';
// Get states for a country
const states = getStates('United States');
console.log(states);
// Get cities for a state
const cities = getCities('Nigeria', 'Lagos');
console.log(cities); // ['Ikeja', 'Lekki', ...]
// Search for a country
const results = searchCountries('united');
console.log(results);Available Functions
Core Functions
getCountries() · getCountry(name) · getStates(country) · getCities(country, state)
Search Functions
searchCountries(query) · searchStates(query) · searchCities(query)
Documentation
📚 Full Documentation - Comprehensive guides and API reference (Coming Soon)
🤝 Contributing - Help improve this package
TypeScript Support
import type { Country, State } from '@xinnovations/atlas';
const country: Country | undefined = getCountry('Canada');License
MIT © Solomon Olatunji
Made with ❤️ in Nigeria 🇳🇬 for the World 🌍
