
Research
/Security News
Chrome and Firefox Extensions Posing as Free VPNs Add Clipboard Stealers via Malicious Updates
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.
@br-validators/core
Advanced tools
100% open-source Brazilian document validators — CPF, CNPJ, CEP, IE (27 UFs), PIX, boleto, and more
100% open-source Brazilian document validators (MIT).
npm: @br-validators/core
Repo: github.com/AlexandreZanata/br-validators
The unscoped name
br-validatorson npm is a different package. Use@br-validators/core.
npm install @br-validators/core
Requires Node ≥ 18. ESM only ("type": "module").
| Module | Functions | Golden vector |
|---|---|---|
| CNPJ | validateCnpj, formatCnpj, stripCnpj | 12ABC34501DE35 |
| CPF | validateCpf, formatCpf, stripCpf | 12345678909 |
| CEP | validateCep, formatCep, stripCep | 01310100 |
| Telefone | validateTelefone, formatTelefone, stripTelefone | 11999999999 |
| CNH | validateCnh, formatCnh, stripCnh | 62472927637 (11 digits, no CPF mask) |
| RENAVAM | validateRenavam, formatRenavam, stripRenavam | 63977791104 (11 digits, modulo 11 peso 9) |
| Placa | validatePlaca, formatPlaca, convertPlacaToMercosul | ABC1D23 |
| PIS/PASEP | validatePisPasep, formatPisPasep | 10027230888 |
| PIX key | validatePixKey, formatPixKey | pix@bcb.gov.br |
| Boleto | validateBoleto, formatBoleto | Situação 1 + 2 |
| Credit card | validateCartaoCredito, passesLuhn | 4111111111111111 |
| IE (27 UFs) | validateInscricaoEstadual, validateIeSp, … | per UF — see docs |
Subpath imports for tree-shaking:
import { validateCnpj } from '@br-validators/core/cnpj';
import { validateInscricaoEstadual } from '@br-validators/core/inscricao-estadual';
import { validateCnpj, formatCnpj } from '@br-validators/core';
const result = validateCnpj('12ABC34501DE35');
// { ok: true, value: '12ABC34501DE35', format: 'alphanumeric', ... }
formatCnpj('12ABC34501DE35');
// { ok: true, formatted: '12.ABC.345/01DE-35', ... }
import { validateInscricaoEstadual } from '@br-validators/core/inscricao-estadual';
validateInscricaoEstadual('110042490114', { uf: 'SP' });
validateInscricaoEstadual('0730000100109', { uf: 'DF' });
Every algorithm cites a primary government source. Full table: OFFICIAL-SOURCES.md
Per-type URLs also available via constants (CNPJ_OFFICIAL_SOURCE_URL, IE_OFFICIAL_SOURCE_URLS, etc.).
npm install -g @br-validators/cli
br-validators cnpj validate 12ABC34501DE35 --json
MIT
FAQs
The Brazilian document validation library for TypeScript — CPF, CNPJ (alphanumeric), NF-e, PIX, boleto, IE (27 UFs), offline IBGE/ANP/NCM/CST/LC116 reference data, and 15+ more. Zero deps, fully typed, never throws.
The npm package @br-validators/core receives a total of 2,945 weekly downloads. As such, @br-validators/core popularity was classified as popular.
We found that @br-validators/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.