Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lagden/cep
Busca por CEP diretamente da API dos Correios
https://github.com/lagden/cep
cep consulta correios coveralls library nodejs snyk
Last synced: 6 days ago
JSON representation
Busca por CEP diretamente da API dos Correios
- Host: GitHub
- URL: https://github.com/lagden/cep
- Owner: lagden
- License: mit
- Created: 2016-09-30T02:55:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T15:16:43.000Z (11 months ago)
- Last Synced: 2024-11-22T22:48:28.503Z (30 days ago)
- Topics: cep, consulta, correios, coveralls, library, nodejs, snyk
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@tadashi/cep
- Size: 1.46 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# CEP
[![NPM version][npm-img]][npm]
[![Node.js CI][ci-img]][ci]
[![Coverage Status][coveralls-img]][coveralls][![XO code style][xo-img]][xo]
[![Snyk badge][snyk-img]][snyk][npm-img]: https://img.shields.io/npm/v/@tadashi/cep.svg
[npm]: https://www.npmjs.com/package/@tadashi/cep
[ci-img]: https://github.com/lagden/cep/actions/workflows/nodejs.yml/badge.svg
[ci]: https://github.com/lagden/cep/actions/workflows/nodejs.yml
[coveralls-img]: https://coveralls.io/repos/github/lagden/cep/badge.svg?branch=master
[coveralls]: https://coveralls.io/github/lagden/cep?branch=master
[xo-img]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg
[xo]: https://github.com/sindresorhus/xo
[snyk-img]: https://snyk.io/test/github/lagden/cep/badge.svg
[snyk]: https://snyk.io/test/github/lagden/cepBusca por CEP diretamente da API dos Correios.
Inspirado [nesse](https://github.com/prodis/correios-cep) projeto feito em Ruby.## Instalação
```
$ npm i -S @tadashi/cep
```## Uso
```js
import cep from '@tadashi/cep'const response = await cep('01311-922')
console.log(response.endereco) // Avenida Paulista
```## API
### consulta(cep: string): object
Nome | Tipo | Descrição
------ | -------- | ------------
cep | string | CEP para a consulta#### Response
Nome | Tipo
------ | --------
bairro | string
cep | string
cidade | string
complemento | string
endereco | string
uf | string## License
MIT © [Thiago Lagden](https://github.com/lagden)