
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@alexandrezanata/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: @alexandrezanata/validators-core
Repo: github.com/AlexandreZanata/doc-raiz
The unscoped name
br-validatorson npm is a different package. Use@alexandrezanata/validators-core.
npm install @alexandrezanata/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 |
| 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 '@alexandrezanata/validators-core/cnpj';
import { validateInscricaoEstadual } from '@alexandrezanata/validators-core/inscricao-estadual';
import { validateCnpj, formatCnpj } from '@alexandrezanata/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 '@alexandrezanata/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 @alexandrezanata/validators-cli
br-validators cnpj validate 12ABC34501DE35 --json
MIT
FAQs
100% open-source Brazilian document validators — CPF, CNPJ, CEP, IE (27 UFs), PIX, boleto, and more
We found that @alexandrezanata/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
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.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.