1.0.9 • Published 4 years ago

easy-location-br v1.0.9

Weekly downloads
132
License
MIT
Repository
github
Last release
4 years ago

easy-location-br

Encontre estados e cidades brasileiras com facilidade.

NPM JavaScript Style Guide

Criar selects com estados e cidades brasileiras não precisa mais ser tão complicado :brazil: :tada:

Instalação

yarn add easy-location-br

ou

npm i easy-location-br

CDN

https://easy-location-br.now.sh/index.js

Import ES6

import { getAllStates, getAllCities, getStateCities } from "easy-location-br";

getAllStates();
/*
  [
    { id: 'AC', name: 'Acre' },
    { id: 'AL', name: 'Alagoas' },
    { id: 'AM', name: 'Amazonas' },
    { id: 'AP', name: 'Amapá' },
  ...]
*/

getAllCities();
/* 
  [
    { stateId: 'AC', name: 'Acrelândia' },
    { stateId: 'AC', name: 'Assis Brasil' },
    { stateId: 'AC', name: 'Brasiléia' },
    { stateId: 'AC', name: 'Bujari' }, 
  ...]
*/

getStateCities("PR");
/* 
  [ 
    { stateId: 'PR', name: 'Abatiá' },
    { stateId: 'PR', name: 'Adrianópolis' },
    { stateId: 'PR', name: 'Agudos do Sul' },
    { stateId: 'PR', name: 'Almirante Tamandaré' },
  ...]
 */

Se divirta! :rocket:

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago