All Projects → wagoid → Busca Cep

wagoid / Busca Cep

Licence: mit
Módulo de node.js que busca por ceps do Brasil utilizando o serviço ViaCEP

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Busca Cep

flunt.br
Extensions of Flunt for Brazilian projects
Stars: ✭ 42 (-40%)
Mutual labels:  cep
Getting Started Guides
Getting Started guides and samples for CEP extensions
Stars: ✭ 296 (+322.86%)
Mutual labels:  cep
Parcel Plugin Cep
Zero configuration CEP extension builder for Parcel
Stars: ✭ 29 (-58.57%)
Mutual labels:  cep
viacep
ViaCEP - Consulte CEPs de todo o Brasil
Stars: ✭ 44 (-37.14%)
Mutual labels:  cep
gocells
Event Based Applications [DEPRECATED]
Stars: ✭ 69 (-1.43%)
Mutual labels:  cep
Spreads
Series and Panels for Real-time and Exploratory Analysis of Data Streams
Stars: ✭ 353 (+404.29%)
Mutual labels:  cep
fiware-cepheus
FIWARE Cepheus - CEP for NGSI IoT gateways
Stars: ✭ 17 (-75.71%)
Mutual labels:  cep
Interference
opensource distributed database with base JPA implementation and event processing support
Stars: ✭ 57 (-18.57%)
Mutual labels:  cep
Kafkastreams Cep
Complex Event Processing on top of Kafka Streams
Stars: ✭ 257 (+267.14%)
Mutual labels:  cep
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-77.14%)
Mutual labels:  cep
city-codes
Brazilian city names and official codes, IBGE, LexML and others
Stars: ✭ 39 (-44.29%)
Mutual labels:  cep
burocracia.cr
No dependency Crystal shard to validate, generate and format Brazilian burocracias such as CPF, CNPJ and CEP
Stars: ✭ 21 (-70%)
Mutual labels:  cep
Brazilian Values
🇧🇷 Funções de formatação, conversão e validação para valores, documentos e outras unidades usadas no Brasil. Como CEP, CNPJ, CPF, BRL (R$), datas, números etc.
Stars: ✭ 366 (+422.86%)
Mutual labels:  cep
consultacep
🇧🇷 Consulta CEP é uma aplicação básica para consulta de CEP
Stars: ✭ 21 (-70%)
Mutual labels:  cep
Grunt Cep
A Grunt plugin that helps debugging and packaging HTML5-based extensions for Adobe Creative Cloud applications.
Stars: ✭ 40 (-42.86%)
Mutual labels:  cep
graphql-cep
Query any CEP using GraphQL - https://graphql-cep-liimjftpnr.now.sh
Stars: ✭ 22 (-68.57%)
Mutual labels:  cep
Serendipity
Serendipity is an open source Customer Engagement Platform
Stars: ✭ 297 (+324.29%)
Mutual labels:  cep
Cep Gratis
Com esse pacote você poderá realizar consultas de CEP gratuitamente.
Stars: ✭ 64 (-8.57%)
Mutual labels:  cep
Brazilian Utils
Utils library for specific Brazilian businesses
Stars: ✭ 1,023 (+1361.43%)
Mutual labels:  cep
Esper
Esper Complex Event Processing, Streaming SQL and Event Series Analysis
Stars: ✭ 680 (+871.43%)
Mutual labels:  cep

busca-cep

Build Status Coverage Status

Busca por ceps do Brasil utilizando o serviço ViaCEP

Instalação

npm install --save busca-cep

Como usar

var buscaCep = require('busca-cep');

buscaCep('01001-000', {sync: false, timeout: 1000})
  .then(endereco => {
    console.log(endereco);
  })
  .catch(erro => {
    console.log(`Erro: statusCode ${erro.statusCode} e mensagem ${erro.message}`);
  });

Ou, caso você queira uma requisição síncrona, passe true no segundo parâmetro:

var resposta = buscaCep('01001-000', {sync: true});
if (!resposta.hasError) {
  console.log(resposta);
} else {
  console.log(`Erro: statusCode ${resposta.statusCode} e mensagem ${resposta.message}`);
}

O segundo parâmetro da função é um options, nele você pode definir o valor do timeout do request (em milisegundos). Exemplo:

buscaCep('01001-000', { timeout: 2000 });

Enjoy it!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].