8
8
<a href =" https://npm-stat.com/charts.html?package=cep-promise " >
9
9
<img src="https://img.shields.io/npm/dm/cep-promise.svg">
10
10
</a >
11
- <a href =" https://coveralls.io/github/filipedeschamps /cep-promise?branch=master " >
12
- <img src="https://coveralls.io/repos/github/filipedeschamps /cep-promise/badge.svg?branch=master">
11
+ <a href =" https://coveralls.io/github/BrasilAPI /cep-promise?branch=master " >
12
+ <img src="https://coveralls.io/repos/github/BrasilAPI /cep-promise/badge.svg?branch=master">
13
13
</a >
14
14
<a href =" https://www.npmjs.com/package/cep-promise " >
15
15
<img src="https://badge.fury.io/js/cep-promise.svg">
16
16
</a >
17
17
<a href =" http://standardjs.com/ " >
18
18
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg">
19
19
</a >
20
- <a href =" https://snyk.io/test/github/filipedeschamps /cep-promise " >
21
- <img src="https://snyk.io/test/github/filipedeschamps /cep-promise/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/filipedeschamps /cep-promise" style="max-width:100%;">
20
+ <a href =" https://snyk.io/test/github/BrasilAPI /cep-promise " >
21
+ <img src="https://snyk.io/test/github/BrasilAPI /cep-promise/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/BrasilAPI /cep-promise" style="max-width:100%;">
22
22
</a >
23
23
</p >
24
24
25
25
<p align =" center " >
26
- Busca por CEP integrado diretamente aos serviços dos Correios, ViaCEP e outros (Node.js e Browser)
26
+ Busca por CEP integrado diretamente aos serviços dos Correios, ViaCEP e WideNet (Node.js e Browser)
27
27
</p >
28
28
29
29
## Features
30
30
31
- * Sempre atualizado em tempo-real por se conectar diretamente aos serviços dos Correios, ViaCEP e outros .
31
+ * Sempre atualizado em tempo-real por se conectar diretamente aos serviços dos Correios, ViaCEP e WideNet .
32
32
* Possui alta disponibilidade por usar vários serviços como fallback.
33
33
* Sempre retorna a resposta mais rápida por fazer as consultas de forma concorrente.
34
34
* Sem limites de uso (rate limits) conhecidos.
35
35
* Interface de Promise extremamente simples.
36
- * Suporte ao Node.js ` 4.x ` , ` 5.x ` , ` 6.x ` , ` 7.x ` , ` 8.x ` , ` 9.x ` , ` 10.x ` e ` @stable ` .
36
+ * Suporte ao Node.js ` 10.x ` , ` 11.x ` , ` 12.x ` , ` 13.x ` , ` 14.x ` e ` @stable ` .
37
+ * Suporte ao Node.js ` 4.x ` , ` 5.x ` , ` 6.x ` , ` 7.x ` , ` 8.x ` , ` 9.x ` , até cep-promise versão ` 3.0.9 ` .
37
38
* Suporte ao Node.js ` 0.10.x ` e ` 0.12.x ` até cep-promise versão ` 2.0.8 ` .
38
39
* 100% de code coverage com testes unitários e E2E.
39
40
* Desenvolvido utilizando ES6.
@@ -103,9 +104,6 @@ cep('99999999')
103
104
// }, {
104
105
// message: 'CEP não encontrado na base do ViaCEP.',
105
106
// service: 'viacep'
106
- // }, {
107
- // message: 'CEP não encontrado na base do Cep Aberto.',
108
- // service: 'cepaberto'
109
107
// }]
110
108
// }
111
109
@@ -131,7 +129,16 @@ cep('123456789123456789')
131
129
// }]
132
130
// }
133
131
```
132
+ ### Options
133
+ - ` timeout ` : Timeout em milisegundos das consultas em cada serviço. O tempo total poderá ser maior devido a limites no paralelismo.
134
+ - ` providers ` : Lista de providers a serem usados na consulta. Default é usar todos os providers disponíveis.
135
+
136
+ ``` js
137
+ import cep from ' cep-promise'
138
+ cep (' 5010000' , { timeout: 5000 , providers: [' brasilapi' ] })
139
+ .then (console .log )
134
140
141
+ ```
135
142
136
143
### Instalação
137
144
@@ -151,6 +158,11 @@ $ npm install --save cep-promise
151
158
```
152
159
$ bower install --save cep-promise
153
160
```
161
+ #### yarn
162
+
163
+ ```
164
+ $ yarn add cep-promise
165
+ ```
154
166
155
167
#### Angular 2
156
168
@@ -167,12 +179,9 @@ Leia nosso guia de contribuição [aqui](CONTRIBUTING.md)
167
179
168
180
## Contribuidores
169
181
170
- | [ <img src =" https://avatars1.githubusercontent.com/u/8251208?v=3&s=115 " ><br ><sub >@lucianopf </sub >] ( https://github.com/lucianopf ) | [ <img src =" https://avatars1.githubusercontent.com/u/7863230?v=3&s=115 " ><br ><sub >@MarcoWorms </sub >] ( https://github.com/MarcoWorms ) | [ <img src =" https://avatars1.githubusercontent.com/u/551228?v=3&s=115 " ><br ><sub >@caio-ribeiro-pereira </sub >] ( https://github.com/caio-ribeiro-pereira ) | [ <img src =" https://avatars1.githubusercontent.com/u/1225447?v=3&s=115 " ><br ><sub >@chrisbenseler </sub >] ( https://github.com/chrisbenseler ) | [ <img src =" https://avatars0.githubusercontent.com/u/3428149?v=3&s=115 " ><br ><sub >@luanmuniz </sub >] ( https://github.com/luanmuniz ) | [ <img src =" https://avatars3.githubusercontent.com/u/3094496?v=3&s=115 " ><br ><sub >@AlbertoTrindade </sub >] ( https://github.com/AlbertoTrindade ) |
171
- | :-:| :-:| :-:| :-:| :-:| :-:|
172
- | [ <img src =" https://avatars1.githubusercontent.com/u/4137355?v=3&s=115 " ><br ><sub >@pedrro </sub >] ( https://github.com/pedrro ) | [ <img src =" https://avatars1.githubusercontent.com/u/8260778?v=3&s=115 " ><br ><sub >@petronetto </sub >] ( https://github.com/Petronetto ) | [ <img src =" https://avatars3.githubusercontent.com/u/434364?v=3&s=115 " ><br ><sub >@olegon </sub >] ( https://github.com/olegon ) | [ <img src =" https://avatars3.githubusercontent.com/u/2177742?v=3&s=115 " ><br ><sub >@jhonnymoreira </sub >] ( https://github.com/jhonnymoreira ) | [ <img src =" https://avatars3.githubusercontent.com/u/2955087?s=115&v=4 " ><br ><sub >@claytonsilva </sub >] ( https://github.com/claytonsilva ) | [ <img src =" https://avatars1.githubusercontent.com/u/13632762?s=115 " ><br ><sub >@thiamsantos </sub >] ( https://github.com/thiamsantos ) |
173
- | [ <img src =" https://avatars2.githubusercontent.com/u/6232791?v=3&s=115 " ><br ><sub >@flyingluscas </sub >] ( https://github.com/flyingluscas ) | [ <img src =" https://avatars1.githubusercontent.com/u/15306309?s=115&v=4 " ><br ><sub >@otaviopace </sub >] ( https://github.com/otaviopace ) |
182
+ <a href =" https://github.com/brasilapi/cep-promise/graphs/contributors " ><img src =" https://contrib.rocks/image?repo=brasilapi/cep-promise " /></a >
174
183
175
184
## Autor
176
185
177
186
| [ <img src =" https://avatars0.githubusercontent.com/u/4248081?v=3&s=115 " ><br ><sub >@filipedeschamps </sub >] ( https://github.com/filipedeschamps ) |
178
- | :---: |
187
+ | :---: |
0 commit comments