Automatic fallback
Tries the providers in order and always returns the same Address object.
CEP library
One API for ViaCEP, BrasilAPI, OpenCEP and AwesomeAPI. When a service goes down, unicep switches to the next one on its own and always returns the same object.
Install
npm install @unicep/coreExample
import { Unicep, defaultProviders } from '@unicep/core';
const unicep = new Unicep({ providers: defaultProviders() });
const address = await unicep.lookup('01310-100');
// { cep: '01310100', street: 'Avenida Paulista', city: 'São Paulo',
// state: 'SP', provider: 'viacep', ... }Tries the providers in order and always returns the same Address object.
Detects unstable services and skips the provider until it recovers.
Plain TypeScript core with bindings for React, Vue and Angular.
llms.txt, Markdown pages and ready-made prompts to implement with AI.