@br-validators/core
Advanced tools
+1
-1
| { | ||
| "name": "@br-validators/core", | ||
| "version": "1.8.0", | ||
| "version": "1.8.1", | ||
| "description": "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.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://www.npmjs.com/package/@br-validators/core", |
+10
-5
| # @br-validators/core | ||
| > **The** Brazilian document validation library for TypeScript. | ||
| > Validate, format, and generate CPF, CNPJ (including the new alphanumeric format), NF-e, BR Code PIX, boleto, IE (all 27 states), ANP fuel prices, and 15+ more — zero dependencies, fully typed, never throws. | ||
| > Validate, format, and generate CPF, CNPJ (including the new alphanumeric format), NF-e, BR Code PIX, boleto, IE (all 27 states), EAN barcodes, CNIS/NIT, ANP fuel prices, and 20+ more — zero dependencies, fully typed, never throws. | ||
@@ -30,7 +30,7 @@ [](https://www.npmjs.com/package/@br-validators/core) | ||
| - ✅ **CNPJ alfanumérico** — new RFB format (effective July 2026), ready now | ||
| - ✅ **19+ document types** — CPF, CNPJ, CEP, NF-e chave, processo judicial CNJ, BR Code PIX, boleto (cobrança + arrecadação), CNH, RENAVAM, placa, PIS/PASEP, PIX key, cartão de crédito, IE (27 UFs), IE produtor rural, título de eleitor, telefone, + platform APIs above | ||
| - ✅ **21+ document types** — CPF, CNPJ, CEP, NF-e chave, processo judicial CNJ, BR Code PIX, boleto (cobrança + arrecadação), CNH, RENAVAM, placa, PIS/PASEP, CNIS/NIT, EAN-8/EAN-13, PIX key, cartão de crédito, IE (27 UFs), IE produtor rural, título de eleitor, telefone, + platform APIs above | ||
| - ✅ **Zero runtime dependencies** — pure TypeScript logic, no HTTP calls | ||
| - ✅ **Never throws** — every function returns `{ ok: true, value } | { ok: false, message, code }` | ||
| - ✅ **Tree-shakeable** — subpath imports per document type | ||
| - ✅ **Reference data** — IBGE, Bacen banks, DDD lookup, national holidays, CNAE, CFOP, NCM, CBO, natureza jurídica, NBS, CEST, eSocial categorias, moedas, PTAX cotações, países Bacen, Incoterms, portos, aeroportos, **ANP fuel prices (LPC)** — embedded offline with daily freshness ([DATA-FRESHNESS.md](../../docs/DATA-FRESHNESS.md); ANP weekly) | ||
| - ✅ **Reference data** — IBGE (municipalities + NF-e `cMunFG`), Bacen banks, DDD lookup, national holidays, CNAE, CFOP, CST, LC 116, NCM, IBPT tax burden, Simples Nacional, CBO, natureza jurídica, NBS, CEST, eSocial categorias, CNPJ motivos, moedas, PTAX cotações, países Bacen, Incoterms, portos, aeroportos, **ANP fuel prices (LPC)** — embedded offline with daily freshness ([DATA-FRESHNESS.md](../../docs/DATA-FRESHNESS.md); ANP weekly) | ||
| - ✅ **ESM only**, Node ≥ 18, works in browser, Bun, Deno | ||
@@ -251,2 +251,4 @@ | ||
| | PIS / PASEP / NIS | `@br-validators/core/pis-pasep` | `br-validators pis-pasep …` | `/pis` | | ||
| | CNIS / NIT (worker ID) | `@br-validators/core/cnis` | `br-validators cnis …` | `/cnis` | | ||
| | EAN-8 / EAN-13 (barcode) | `@br-validators/core/ean` | `br-validators ean …` | `/ean` | | ||
| | PIX key | `@br-validators/core/pix` | `br-validators pix …` | `/pix` | | ||
@@ -275,3 +277,3 @@ | BR Code (PIX QR payload + builder) | `@br-validators/core/brcode` | `br-validators brcode …` | `/brcode` | | ||
| |---------|---------|-----|------------|----------|-----------------| | ||
| | IBGE states + municipalities | `@br-validators/core/ibge` | `ibge lookup` · `list` | `/data/ibge` | `getEstados`, `getMunicipios`, `getMunicipioPorCodigo` | [IBGE localidades API](https://servicodados.ibge.gov.br/api/docs/localidades) | | ||
| | IBGE states + municipalities + NF-e cMunFG | `@br-validators/core/ibge` | `ibge lookup` · `list` | `/data/ibge` | `getEstados`, `getMunicipios`, `getMunicipioPorCodigo`, `toCmunFg`, `parseCmunFg` | [IBGE localidades API](https://servicodados.ibge.gov.br/api/docs/localidades) | | ||
| | Bacen STR banks (COMPE / ISPB) | `@br-validators/core/bancos` | `bancos lookup` · `list` | `/data/bancos` | `getBancos`, `getBancoPorCodigo`, `getBancoPorIspb` | [Bacen Participantes STR](https://www.bcb.gov.br/content/estabilidadefinanceira/str1/ParticipantesSTR.csv) | | ||
@@ -290,2 +292,5 @@ | ANAC public aerodromos | `@br-validators/core/aeroportos` | `aeroportos lookup` | `/data/logistics` | `getAeroportos`, `getAeroportoPorIata`, `getAeroportoPorIcao`, `getAeroportosPorMunicipio` | [ANAC aeródromos públicos CSV](https://www.anac.gov.br/acesso-a-informacao/dados-abertos/areas-de-atuacao/aerodromos/lista-de-aerodromos-publicos/aerodromospublicosv1.csv/@@download/file/aerodromospublicosv1.csv) | | ||
| | NCM Mercosur nomenclature | `@br-validators/core/ncm` | `ncm lookup` · `search` | `/data/fiscal` | `getNcmPorCodigo`, `searchNcm` | [Siscomex NCM JSON](https://portalunico.siscomex.gov.br/classif/api/publico/nomenclatura/download/json) | | ||
| | IBPT approximate NCM tax burden | `@br-validators/core/ibpt` | — | `/data/fiscal` | `getIbptCargaPorNcmUf`, `computeIbptCargaTotal` | [IBPT Lei 12.741/2012](https://www.planalto.gov.br/ccivil_03/_ato2011-2014/2012/lei/l12741.htm) | | ||
| | Simples Nacional annex tables | `@br-validators/core/simples-nacional` | — | `/data/fiscal` | `getSimplesAnexo`, `getSimplesFaixa`, `computeSimplesAliquotaEfetiva` | [LC 123/2006 Planalto](https://www.planalto.gov.br/ccivil_03/_ato2007-2010/2006/lei/l123.htm) | | ||
| | CNPJ motivos situação cadastral | `@br-validators/core/cnpj-motivos` | — | `/data/fiscal` | `getMotivosSituacaoCadastral`, `getMotivoSituacaoCadastralPorCodigo` | [RFB Motivos.zip](https://dadosabertos.rfb.gov.br/CNPJ/dados_abertos_cnpj/) | | ||
| | Natureza jurídica (CNPJ) | `@br-validators/core/natureza-juridica` | `natureza-juridica lookup` | `/data/fiscal` | `getNaturezaJuridicaPorCodigo` | [RFB Naturezas.zip](https://dadosabertos.rfb.gov.br/CNPJ/dados_abertos_cnpj/) | | ||
@@ -350,3 +355,3 @@ | NBS (NFSe Nacional) | `@br-validators/core/nbs` | `nbs lookup` | `/data/fiscal` | `getNbsPorCodigo`, `searchNbs` | [NFSe Anexo B NBS2 xlsx](https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/documentacao-atual/anexo_b-nbs2-lista_servico_nacional-snnfse.xlsx) | | ||
| **v1.7.0** — all six `@br-validators/*` packages ship the same semver. New in core: `@br-validators/core/anp-combustiveis` (`getAnpPrecosMedios`, `getAnpPrecosMediosPorIbge`, `getAnpSemanaAtual`). [CHANGELOG](https://github.com/AlexandreZanata/br-validators/blob/main/CHANGELOG.md#170---2026-06-24) | ||
| **v1.8.0** — all six `@br-validators/*` packages ship the same semver. Ten new core subpaths: `cst`, `lc116`, `ptax`, `esocial`, `ean`, `simples-nacional`, IBGE `cMunFG`, `cnpj-motivos`, `ibpt`, `cnis`. [CHANGELOG](https://github.com/AlexandreZanata/br-validators/blob/main/CHANGELOG.md#180---2026-06-25) | ||
@@ -353,0 +358,0 @@ --- |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
24208964
0389
1.3%