Canonical reference lists (countries, languages, time zones, currencies, etc.) with ergonomic TypeScript helpers.
npm install @mirawision/infopediaReady‑to‑use lists and helpers for everyday application data: countries, languages, locales, time zones, currencies, and more — with zero dependencies.
- Countries and flags
- Country phone codes
- Continents
- Languages
- Locales
- Time zones
- Currencies
- Months and weekdays (English)
- US states and codes
``bash`
npm install @mirawision/infopedia
`ts
// CommonJS
const { getCountryByISO2, getCurrency } = require('@mirawision/infopedia');
console.log(getCountryByISO2('PL')?.name.en); // "Poland"
console.log(getCurrency('USD')?.symbol); // "$"
`
`ts
// Countries
const { countries, findCountriesByName } = require('@mirawision/infopedia/countries');
// Locales
const { getLocalesByLanguage } = require('@mirawision/infopedia/locales');
// Time zones
const { getTimeZone } = require('@mirawision/infopedia/timezones');
`
- Find a country by code: getCountryByISO2('US')findCountriesByName('king')
- Search countries by name: getCountriesByDialCode('+44')
- Get countries by dial code: getLanguageBy639_1('en')
- Get a language by code: getLocalesByLanguage('es')
- List locales for a language: getTimeZone('Europe/Warsaw')
- Look up a time zone: getCurrency('EUR')
- Look up a currency: getUSState('CA')`
- Find a US state:
- Data is read‑only (arrays are frozen)
- No runtime dependencies
Contributions are always welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.