Projetos
Ver no GitHub
SonoJS/SonoJS-geo
Sobre
A lightweight JavaScript and TypeScript package providing country, state, and city data with simple APIs.
Desenvolvimento web e de aplicativosCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- Coletando histórico
- em 15 dias
- Coletando histórico
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original@sonojs/geo
Countries, states, and cities for JavaScript. Lazy-loaded shards, async API, TypeScript types.
Links
Install
npm install @sonojs/geo
Usage
import { getCountryByIso2, getCitiesByCountry } from "@sonojs/geo";
const country = await getCountryByIso2("JP");
const cities = await getCitiesByCountry("JP");
Browser or custom hosting:
import { configureGeo, getCountryByIso2 } from "@sonojs/geo";
configureGeo({
dataBaseUrl: new URL("./node_modules/@sonojs/geo/data/", import.meta.url).href,
});
await getCountryByIso2("JP");
License
Package code: MIT (LICENSE). Geographic data: ODbL 1.0 (NOTICE.md, ODbL-1.0.txt) from dr5hn/countries-states-cities-database.
Explore projetos relacionados
Carregando…