MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / isValidCep

Function isValidCep

services/cep/cep.js:13–16  ·  view source on GitHub ↗
(cep)

Source from the content-addressed store, hash-verified

11}
12
13function isValidCep(cep) {
14 const cleanCep = onlyDigits(cep);
15 return cleanCep.length === CEP_LENGTH;
16}
17
18async function fetchOpenCep(cep) {
19 const { data } = await axios.get(`https://opencep.com/v1/${cep}`, {

Callers 1

fetchCepFunction · 0.85

Calls 1

onlyDigitsFunction · 0.85

Tested by

no test coverage detected