Immutable
release. Only release title and notes can be modified.
2.4.0 (2026-09-17)
Features
- area-code: add getAreaCodeInfo and getAreaCodesByState (748d9b8)
- area-code: list every state a DDD serves (42, 47, 49 and 61 span two states) (e17e55a)
- banks: add getBanks, getBankByCode and getBankByIspb; validate every Bacen bank account (ac2e84d)
- boleto: support boleto de arrecadação and a referenceDate option (6bde780)
- business-days: add isBusinessDay, addBusinessDays and differenceInBusinessDays (2b78c29)
- business-days: follow the date-fns signatures and add subBusinessDays (688359f)
- capitalize: keep company designations, roman numerals and state codes upper case by default (b6cb522)
- cbo: add getCbo and isValidCbo (a59ffbd)
- cei-cno-caepf: add isValidCei, formatCei, isValidCno, formatCno, isValidCaepf and formatCaepf (fda26b0)
- cep: declare the unidade, estado and regiao fields of the ViaCEP response (811cb10)
- certidao: add formatCertidao, isValidCertidao and parseCertidao (db5a602)
- cfop: add getCfop and isValidCfop (853202b)
- cnae,ncm: add the pad option to formatCnae and formatNcm (09408b1)
- cnae: add formatCnae, getCnae and isValidCnae (2defadd)
- cnpj: accept a branch number in generateCnpj (33e27be)
- cnpj: add an obfuscate option to formatCnpj (65c118c)
- cns: add isValidCns and formatCns (d054ce6)
- cpf: add an obfuscate option to formatCpf (b6150ab)
- credit-card: add isValidCreditCard (5c74b88)
- cst: add isValidCst and isValidCsosn (536eec5)
- currency-to-words: add convertCurrencyToWords (e24e446)
- date-to-words: add convertDateToWords (b9b3a63)
- export public types from the package root (6c67309)
- format: mask the new formatters progressively like formatCpf and add pad to formatLegalNature (e676688)
- iban: add formatIban, isValidIban and parseIban (31d3cb4)
- legal-nature: add getLegalNature (1abbd8c)
- legal-nature: expose the CONCLA category and add getLegalNaturesByCategory (defbdf8)
- legal-nature: mark the eight retired codes as legacy with their current code (bb52cda)
- municipality: add getMunicipalities and getMunicipalityByCode (offline IBGE data) (bed7b3f)
- municipality: add overloaded return types to getMunicipality (2687731)
- ncm: add formatNcm and isValidNcm (80f50d1)
- nfe-key: accept every 44-digit DF-e model, the SVC-SP emission and the XML id prefixes (60fcb46)
- nfe-key: accept the CT-e OS model 67 (fe9e30f)
- nfe-key: add formatNfeKey, isValidNfeKey and parseNfeKey (d639a7a)
- number-to-words: add convertNumberToWords (3a54ca0)
- parse: add the mask-stripping parse function of every new family (c2dfcfa)
- phone: accept 7 and 8 as mobile first digits under version 2 (af21b77)
- phone: add isValidServicePhone and an accept/auto-mask upgrade to isValidPhone/formatPhone (82df2d9)
- pix: add generatePixPayload, isValidPixPayload, isValidPixKey, parsePixPayload and parsePixKey (088861e)
- registro-profissional: add isValidRegistroProfissional (263c6ff)
- remove-accents: add removeAccents (18ff45e)
- renavam: add generateRenavam (e46aa21)
- states: add getStateByIbgeCode, getStateCodeByName, getStateNameByCode and getTimezoneByState (cc3ce8a)
- states: tie the name, region and IBGE code of State to its code (d8326f0)
- types: export the public types from the subpath entries (6f2b2e8)
- vin: add isValidVin (9d6c762)
- voter-id: support 13-digit São Paulo/Minas Gerais voter ids (9a3c4c4)
Bug Fixes
- account for FEBRABAN'"'"'s 22/02/2025 fator de vencimento cycle reset. (6bde780)
- adjust build error and update deps (40e0d85)
- api: align the new utils with the library conventions (58d561b)
- area-codes: return regionName and regionCode from getAreaCodeInfo, as State does (72856eb)
- bank-account: accept only P for a Bradesco remainder of 1 and drop the extinct bank 746 (e476a92)
- banks: follow the Bacen STR participants CSV to its new address and repoint dead sources (e5b8f9b)
- boleto: keep the fator de vencimento inside the first cycle for an early reference date (ee2f02b)
- business-days: return false from isBusinessDay for a non-string state code (03e5c11)
- caepf: reject a repeated base like CEI and CNO do (f7eb3bb)
- capitalize: keep the English possessive, single-letter designators and a pronoun me low (7565d3d)
- capitalize: match user word lists case-insensitively and treat - and / as word boundaries (2280040)
- capitalize: read a designation written around a slash as the designation after ME (4013eb3)
- capitalize: write ME as the pronoun after a hyphen and before a word that is not a designation (27581f2)
- cbo,cnae: pad a numeric code before validating it (fe32617)
- cep: reject non-digit characters and drop the dead widenet provider (ddaadd0)
- cep: reject with the typed errors for a bad providers list, a missing UF and a BrasilAPI 404 (02bd64f)
- certidao: reject unknown book types and take the matrícula as a string (862a782)
- certidao: require the registro civil service code 55 (b8ded2e)
- cfop: drop the 23 group headings ending in 50 from the table (27d6664)
- cities: return fresh copies and cache the combined list (7ddcea0)
- cnpj: fall back to the numeric format in generateCnpj for any version other than 2 (ff2e3c9)
- cnpj: select the alphanumeric rule only for version 2 (3712fcd)
- cns,cei: accept a run of separators like the other document formats (fac0769)
- cns: reject values that are not fifteen digits with optional separators (b2795cd)
- cpf: use the Receita Federal região fiscal digit for MS and MT (273a143)
- credit-card: accept only digits, spaces and hyphens and reject unsafe numbers (203ea57)
- csosn: read only the bare 3 digits, the code has no printed grouping (214da0d)
- cst: accept a separator only after the origin digit (40bc6a8)
- currency-to-words: never round a sub-cent amount up to the next cent (1fbcc08)
- currency: coerce a non-string value without throwing and read the cents from the decimals (c9f5a5e)
- currency: parse real decimal/thousands separators and never format non-finite values (d205308)
- email: cap the final domain label at 63 letters (aeef62c)
- email: follow the WHATWG domain label grammar (c415639)
- fetch: reject a retries count that is not an integer (2433f90)
- generate alphanumeric CNPJs using the full A-Z alphabet (cd6b5f4)
- generate alphanumeric CNPJs using the full A-Z alphabet (dff411e)
- generateCnpj generates alphanumeric CNPJs using the full A-Z alphabet. (65c118c)
- generateCpf retries when the generated base would be a repeated-digit sequence. (b6150ab)
- generate: never throw on a prototype key or an object without toString (ca8d37d)
- holidays: add the GO and DF state entries, end PB 26/07 in 2015 and reject hostile state codes (4645f54)
- holidays: audit every state holiday against its law (e010b79)
- holidays: cite each state holiday's law and name the Consciência Negra entries (d048c01)
- holidays: isHoliday returns a boolean and never throws (f44d3a8)
- holidays: move the Santa Catarina state holidays to Sunday per the 1999, 2004 and 2005 laws (89cb3d5)
- iban: accept every account type letter of the SFN dictionary (8b65923)
- iban: accept only the printed IBAN characters before sanitizing (dab1a9d)
- iban: reject 0 as the holder indicator and apply the printed character set to format and parse (b688fd0)
- ie: accept SP produtor rural and Tocantins 11-digit registrations (464bb6e)
- isValidCpf accepts whitespace and the common separators between groups. (b6150ab)
- legal-nature: replace the table with IBGE/CONCLA Natureza Jurídica 2021 (501f8ac)
- legal-nature: strip the mask from a numeric code in getLegalNature (ff7eda6)
- license-plate: fall back to the default format instead of using an unknown one verbatim (85d7a2e)
- license-plate: strip mask characters and add Mercosul conversion (0d12b7d)
- lookups: read a code the same way whether it comes as a string or a number (5ef48fd)
- lookups: read includeLegacy for truthiness in getBanks and getLegalNatures (4613b6d)
- municipalities: keep a state code that is not a string out of the own-property lookup (aec89a6)
- municipality: resolve a numeric IBGE code in getMunicipality (df51b0a)
- municipality: return a fresh pair and overload the return type on the lookup direction (033d6bd)
- never throw on nullish input across the public API (481fb92)
- nfe-key: accept only the assigned tpEmis values (e773022)
- nfe-key: return an empty string from formatNfeKey for a value that is not a key (7d23f3a)
- package: resolve the subpath declarations under moduleResolution node (1a27003)
- passport: accept lowercase and mask characters (c5644ec)
- passport: never throw on hostile objects and delegate formatPassport to parsePassport (f6b1df2)
- phone: group a 10-digit landline under nanp and auto, never throw on an unknown mask (33ebc6e)
- phone: read a bare 55 before a service number as the country code (5c34f47)
- pis: accept alphanumeric-style separators and avoid repeated-digit bases (a8a78dc)
- pix: keep the word boundary when a merchant name carries non-ASCII whitespace (31bbcb8)
- pix: optional point of initiation, Pix Saque payloads and amounts that round-trip (6334f2f)
- pix: read only mobile numbers as phone keys (828b7dc)
- pix: reject a dynamic payload that carries a Pix Saque facilitator (c16f096)
- pix: validate the key syntax, the location encoding and the payload pairing (e76f0c3)
- processo-juridico: check the órgão and tribunal codes against Resolução CNJ 65/2008 (110bc12)
- processo-juridico: use the CNJ Resolução 65/2008 dot-separated mask (431e2b4)
- registro-profissional: follow the CFC and CFP registration layouts (5915813)
- registro-profissional: read T and S as transfer suffixes after the CRC check digit (898186f)
- reject negative, fractional and unsafe numbers in every code lookup (9cb73d0)
- reject stray characters in isValidCnh, isValidVoterId and isValidProcessoJuridico (47a9db2)
- renavam: reject repeated digits and stray characters (873065e)
- resolve to null when code is not exactly 7 digits, without making a request. (2687731)
- service-phone: drop 112 and 911 and add 141 per the Anatel Ato 43.151/2004 (cfc5ed0)
- states: sort by pt-BR locale and return fresh, mutation-safe copies (e894d3c)
- tables: validate the input of every code lookup the same way (7cdd6c8)
- types: keep the @deprecated tag of the 2.3.0 aliases in the declarations (8cb0a29)
- types: re-export the bank and state types from the eight subpaths that still lacked them (4d44ec4)
- types: re-export the option and state types from the calendar and area code subpaths (edf4577)
- types: roll up declaration entrypoint (40f2f18)
- types: roll up declaration entrypoint (9524bae)
- validators: accept the CPF mask separators at the printed groups of the NF-e key, IBAN and card (0e38f5e)
- words: write the groups the way the official texts do, without commas, and spell 14 quatorze (6d47c14)
Performance
- cache Intl.NumberFormat instances per (symbol, precision) pair. (d205308)
- remove top-level allocations to restore tree-shaking (f84dc93)
Documentation
- add llms.txt, community health files and refresh docs/changelog (076d914)
- align the README, migration guide, changelog header and release config with the toolchain (6804088)
- badges, a "why" section, the brand logo on the docs cover and search (7160341)
- bring the v1 to v2 migration guide up to 2.4.0 (edbc98e)
- business-days: name the includeOptional and stateCode options in the three walkers (3600310)
- cep: say a CEP that starts with 0 has to be a string when given as a number (882cf95)
- cite the acts and ajustes behind the fiscal and calendar utilities (1d3aeb0)
- cite the annexes, decrees and manuals behind the identifiers and refresh the generated pages (01b7d32)
- cite the primary source behind every validator and lookup (5247e22)
- describe every option used in the examples and correct the remaining citations (e35bc22)
- describe the acervo codes of art. 473, the arrecadação result and the legal-nature header (e935499)
- document every public type and export the types the API refers to (79f36f7)
- final pass before the release (6a33dea)
- final pass on the docs, README, package metadata and GitHub files (8170689)
- fix the examples and source citations the function-by-function review flagged (b79cef0)
- group the utilities reference by family (bffdcd2)
- municipalities: deprecate getCities and getMunicipality in favour of the municipality family (d313bcc)
- put every cited URL on its own citation line and fill the thin sections (68bc902)
- readme: state the Node.js 24 development requirement, apart from the library range (bb91be4)
- refine the utilities pages and use npm run for the package scripts (d0dba0a)
- site: move the docsify site to v5 (5dd2a97)
- state the measured isValidCpf size and fix two comments in the words tables (e879cb4)
- state the supported Node.js range instead of 20+ in the feature list (3ab1b44)
- track the public API surface with API Extractor (ec56e4f)
- words: cite the articles of Lei 14.822/2024 that carry each spelling (5c8a9d4)