Repository navigation
Immutable
release. Only release title and notes can be modified.
2.5.0 (2026-10-03)
Features
- area-codes: add getMunicipalitiesByAreaCode and getAreaCodeByMunicipalityCode (538f915)
- cbo: add formatCbo (c26888c)
- cest: add isValidCest, formatCest, parseCest and getCest (32e2aff)
- cfop: add formatCfop (ae2a308)
- cid10: add isValidCid10, getCid10, formatCid10 and parseCid10 (495a0a8)
- isbn: add isValidIsbn, parseIsbn, getIsbnInfo and formatIsbn (1a50bcc)
- license-plate: let isValidLicensePlate take the format to accept (3dec90d)
- municipalities: add getCodeByMunicipalityName (c69befc)
- nbs: add parseNbs (6fe8ca1)
- nbs: add the pad option to formatNbs (dc85223)
- processo-juridico: add getProcessoJuridicoInfo (3640237)
- registro-profissional: accept the CRO number form of art. 115 of the CFO norms (e60fe5a)
- states: add getStateCapital, getRegions and getStatesByRegion (6e62985)
- voter-id: add getVoterIdInfo (16d51e8)
Bug Fixes
- area-codes: read codes by their digits, as getAreaCodeInfo and getMunicipalityByCode do (feeabca)
- boleto: accept only the código de moeda 9 and the 988 layout, and generate dated factors (035a04e)
- boleto: accept the 44 digit cobranca bancaria barcode (7334fba)
- boleto: ignore an invalid referenceDate in getBoletoInfo (07a5780)
- boleto: read a number only when it is a non-negative safe integer (c67c1ba)
- boleto: reject letters and stray characters in isValidBoleto (e1a9b4d)
- caepf: read a number only when it is a non-negative safe integer (a99fe3d)
- caepf: reject negative and fractional numbers (6fc9a90)
- capitalize: keep every roman numeral up to XXXIX upper case, not just to XXIII (0c419d5)
- capitalize: keep more prepositions and S.A in the right case, scan linearly (e936f51)
- capitalize: write the UF of a "Cidade - UF" address in upper case (526a27a)
- cbo: build the table from the MTE's current release, kept in the repository (cac077f)
- cbo: read a number only when it is a non-negative safe integer (3ff37bb)
- cei,cno: reject negative and fractional numbers (801f2f9)
- cei: read a number only when it is a non-negative safe integer (88f5bda)
- cep: read a number only when it is a non-negative safe integer (040b530)
- cep: reject negative and fractional numbers (97969c0)
- certidao: read a number only when it is a non-negative safe integer (90592af)
- cest: read a number only when it is a non-negative safe integer (4ae9a5d)
- cfop: read a number only when it is a non-negative safe integer (a590084)
- cid10: add the U07 codes of the DATASUS SIM table the V2008 files lack (196985e)
- classifications: read null options as none in isValidCst and isValidClassTrib (840604f)
- cnae: read a number only when it is a non-negative safe integer (72a5de6)
- cnh: read a number only when it is a non-negative safe integer (3215bb6)
- cno: read a number only when it is a non-negative safe integer (d19ad28)
- cnpj: never generate the número de ordem 0000, which is never assigned (6e0dee4)
- cnpj: read a number only when it is a non-negative safe integer (b6563f3)
- cns: read a number only when it is a non-negative safe integer (8592439)
- cns: reject negative and fractional numbers (29b5a18)
- convert-number-to-words: export NumberToWordsGender from the subpath entry (7fbabbf)
- cpf: read a number only when it is a non-negative safe integer (e484f4e)
- cst: accept the bare 2 digit Tabela B codes for tax icms (f2f1aff)
- email: cap the address length and accept a punycode final label (aafdabd)
- format: return an empty string when the value has no digits, even with pad (960d9bb)
- generate-cep: draw the CEP inside the ranges the states own (54bb018)
- get-address-info-by-cep: abort the providers that lost the race (df8b01d)
- get-address-info-by-cep: read a provider CEP without its leading zero as the same CEP (b32ce6c)
- get-address-info-by-cep: reject an address that contradicts the CEP (17f121f)
- get-address-info-by-cep: validate like isValidCep, add timeoutMs and signal (c3f3a7f)
- get-cep-info-by-address: validate the city and street before the request (9ff2296)
- get-holidays: drop the AM and PR optional days no state norm declares (c919097)
- get-holidays: list Acre's Dia do Católico and name both transfer exceptions (567978d)
- get-holidays: list Alagoas' 20 November from 1995 to 2023 under Lei AL 5.724/1995 (f6dc883)
- get-holidays: list Carnaval Monday as a ponto facultativo next to the Tuesday (1e4a799)
- get-holidays: list each national holiday only in the years a federal norm declared it (2ef1027)
- get-holidays: list the first round of the elections as a national holiday (c67a7ec)
- get-holidays: start each state holiday in the first year its law applied (905cf9e)
- get-holidays: start the AM 8 December ponto facultativo in 1999 and keep tables literal (2eb0d06)
- get-holidays: type Rio de Janeiro's Carnaval Tuesday as a state holiday from 2009 (7c56a74)
- holidays,bank-account: add Rio de Janeiro's Corpus Christi and accept 12 digit Caixa accounts (b62fb2d)
- holidays: add Alagoas' Dia Estadual do Evangélico, 30 November, from 2014 (cc084f9)
- holidays: add Amapá's Dia de Cabralzinho, 15 May, from 2018 (Lei AP nº 2.213/2017) (8f0412c)
- holidays: add Amapá's Dia de São Tiago, 25 July, from 2012 to 2018 (fd2aafd)
- holidays: add Maranhão's Dia Internacional da Mulher, 8 March, from 2027 (d437782)
- holidays: follow the official texts gathered for the open holiday questions (41290e7)
- holidays: list Amapá's 20 November from 2008, the first one after Lei AP nº 1.169/2007 (f39c2dc)
- holidays: list Paraíba's 5 August from 1968, under Lei PB nº 3.489/1967 (d52be2b)
- holidays: list PR 19/12 from 1963 to 2013, AM 08/12 and PE 06/03 of 2008-2009 as the norms say (1e3d8a2)
- holidays: list Sergipe's 8 July from 1990 and its 24 October from 1989 to 1999 (46331ca)
- holidays: make Corpus Christi a feriado estadual in Maranhão from 2024 (0093e06)
- holidays: read stateCode like the other state utils and reject a non-state (9225f30)
- iban: accept an alphanumeric ISPB and cite Resolução BCB nº 585/2026 (8c91543)
- iban: read a number only when it is a non-negative safe integer (3f0a860)
- ie: accept only the Alagoas tipo de empresa digits 0, 3, 5, 7 and 8 (b8b3c3f)
- ie: accept only the Pará prefixes 15 and 75 (a942d8f)
- ie: accept the 9 digit Mato Grosso registration (0a854c8)
- ie: accept the Distrito Federal prefix 08 (a224dcd)
- ie: accept the Goiás prefixes 20 to 29 (22eabd8)
- ie: accept the old 14 digit Pernambuco CACEPE registration (8cf1255)
- ie: accept the Pará prefixes 76 to 79 the SINTEGRA page lists (65f9947)
- ie: require the 0 after the P of a São Paulo produtor rural registration (3f224a4)
- ie: trim the state code, as the other utils that take a state do (b139996)
- is-valid-phone: apply the character check to the string form of any value (a3e5511)
- isbn: reject 979-0, the ISMN range, in isValidIsbn (a070dbb)
- legal-nature: accept numbers and read the documented mask only (f27b8a4)
- legal-nature: read a number only when it is a non-negative safe integer (6259d13)
- legal-nature: reject negative and fractional numbers in getLegalNature (ee00e23)
- license-plate: draw the fifth letter of a generated Mercosul plate from K to Z (345450e)
- license-plate: reject characters outside the mask, in isValidRegistroProfissional too (6fce860)
- ncm: read a number only when it is a non-negative safe integer (cf0aeb0)
- nfe-key: accept the alphanumeric CNPJ in positions 7 to 18 of the access key (32ebc70)
- nfe-key: read a number only when it is a non-negative safe integer (0de7184)
- nfe-key: strip the XML Id prefix and reject wrong types in formatNfeKey (2702a11)
- phone: accept a country code in isValidServicePhone (660f5f7)
- phone: drop an explicit country code in every formatPhone mask (2f12922)
- phone: generate landlines that stay valid after March 2027 (24083b7)
- phone: read a number only when it is a non-negative safe integer (674e125)
- phone: reject a mobile number starting with 6 under the default version too (70346ff)
- phone: reject letters and other junk in phone validators (e5f6f12)
- phone: strip an explicit +55 or 0055 at any length (625dd25)
- pis: read a number only when it is a non-negative safe integer (ca2ea73)
- pix-key: drop the & the current DICT API removed from the e-mail key pattern (1402462)
- pix-key: reject a phone key that repeats the country code (d4a6207)
- pix: accept a dynamic BR Code whose txid is filled, as §2.7 has the payer ignore it (e3dbf4c)
- pix: check an e-mail key against the DICT pattern instead of isValidEmail (9722941)
- pix: read a BR Code amount the way the EMV writes it (649c0ef)
- pix: reject a BR Code object whose declared length is 00 (205db69)
- pix: require the CRC as the last object and reject repeated IDs (f909834)
- pix: require the merchant category code of a BR Code to be 4 digits (49bb373)
- pix: require the payload format indicator to open the BR Code (3459ee5)
- pix: validate a BR Code by the rules of the Pix manual, not only its structure (433c78b)
- processo-juridico: read a number only when it is a non-negative safe integer (a22a8d2)
- read-municipality-area-code: read the index by own key only (99f3c20)
- renavam: reject negative and fractional numbers (82d8395)
- service-phone: take the SUP codes from the current Anatel list and accept 112 (52a904f)
- states: read the state code ignoring case in every state-taking util (764c484)
- to-standard-schema: report a throwing validator as an issue (74484c1)
- types: re-export option types from the cnpj and license plate subpaths (ee75fa0)
- validators: read the mask of every identifier the way isValidCpf does (1f82b56)
- vin: check a VIN by the Brazilian rule, the 49 CFR check digit on request (38a2194)
- vin: test for ASCII letters before upper casing in isValidVin and isValidNfeKey (b46084c)
- voter-id: read a number only when it is a non-negative safe integer (f26cd3e)
- voter-id: read a voter id as at most 12 digits, its leading zeros droppable (d2523a1)
Performance
- area-codes: index each state's DDDs once instead of searching per municipality (71acede)
- bank-account: stop bundling the COMPE codes twice in isValidBankAccount (945cd52)
- banks: ship the banks as three columns, sharing the code list with the bank account validator (7ee5add)
- business-days: reuse one Date per walk in eachLocalDay (8d174bd)
- capitalize: cache the default word sets (a06da80)
- cbo: check a CBO code without bundling the occupation titles (c9574ae)
- cest: check a CEST without bundling the goods descriptions (69829e8)
- cfop: check a CFOP code without bundling the operation descriptions (3e51724)
- cid10: keep the code shape out of the dataset module (6913360)
- cid10: look a CID-10 description up by index instead of by code (e00f170)
- cid10: pack the category table as base 36 distances and subcategory masks (7ef9a79)
- cities: build the cached list of every city with toSorted (d3edbf7)
- cnae: check a CNAE code without bundling the subclass descriptions (0cc45b8)
- cpf: read the states of a fiscal region from a cache (2b0d22b)
- data: ship description tables as one string that shares the start of neighbouring texts (762bb34)
- get-address-info-by-cep: check the answered state against the CEP range alone (0df8ce1)
- gtin: split the GS1 check digit out of mod10 (ad72bee)
- holidays: read holiday days from the memo instead of rebuilding dates (bbb085d)
- ibs-cbs: split the cClassTrib codes and descriptions out of the CST table module (70ac08f)
- isbn: write each range end without its trailing 9s and drop the separator before the length (1a79497)
- legal-nature: check a legal nature code without bundling the descriptions (fe26735)
- legal-nature: move the legal nature codes out of the module that holds the descriptions (4ac2825)
- lookups: find a code in a packed table by bisection (f7e8ac5)
- lookups: index the lookup tables lazily instead of scanning them per call (e985eb4)
- lookups: pack the code tables as base 36 differences (01de6f1)
- municipalities: pack the municipality names the way the descriptions are packed (6102c37)
- municipalities: ship names and codes packed and apart, so a lookup bundles what it reads (f211288)
- municipality: iterate the state codes instead of the states table (bae90c3)
- nbs: check an NBS code without bundling the descriptions (99429c3)
- ncm: ship the NCM codes as one packed string (c1b4fee)
- phone: stop the mobile and generic phone validators importing each other's types (611a7e7)
- pix: check a Pix phone key with isValidMobilePhone directly (e5d6722)
- pix: checksum with a lookup table and parse TLV without regexes (781914c)
- root: drop the module-level statements every root import kept (e133d57)
- service-item: check a subitem without bundling the service descriptions (cc9b6b7)
- states: check a state code against the util's own table (c947d54)
Documentation
- address-form: fix the guide links and clear aria-busy on an incomplete CEP (808a359)
- area-code: check the DDD tables against the current Anatel CN table (f6aa2e6)
- area-codes: say the codes are read by their digits (62f27ef)
- bank-account: cite the CNAB 240 v11.0 notes that leave the check digit to each bank (a958800)
- bank-account: say where the check digit rules come from (955df10)
- boleto: cite Bradesco for the fator de vencimento base date (cfc7cbc)
- boleto: cite Layout de Arrecadação v8 and drop an unverified FEBRABAN communiqué (5dd780c)
- boleto: state that a 44 digit barcode starting with 8 is always read as arrecadação (9a35612)
- bundle: refresh the two table figures that moved by 0.1 KB (e883225)
- bundle: regenerate every size figure from the tree-shaking script (397a3ce)
- bundle: update the size figures for the perf changes (2b562e0)
- business-days: cite IN MTP nº 2/2021 from the DOU and say what art. 14, I governs (ed5bf26)
- business-days: quote art. 6º of Resolução CMN nº 4.880/2020 in full (f2b109d)
- business-days: stop calling the default count the calendar of banks and courts (f5199a7)
- caepf,cei,cno: cite the official format sources and say the check digits have none (a4432bb)
- cep: fix the CEP, state and capital notes in the docs and JSDoc (630fe51)
- certidao: trace book codes 8 and 9 to Prov. CNJ 3/2009 and say the DV was never published (f862881)
- cest: name isValidCest among the dataset-backed utils (eee3887)
- cid10: name the COVID-19 codes the DATASUS V2008 tables do not have (e054b44)
- class-trib: say why getClassTrib reads its table instead of calling isValidClassTrib (718d1d7)
- classifications: state the mask-run rule for the masked codes and drop stale CBO history (58b39aa)
- cnh: cite Res. CONTRAN 1.020/2025, which repeats the layout and leaves the 886/2021 in force (45c21b3)
- cnh: read art. 4º § 1º as the rule of the Espelho's check digit (a6cd5e0)
- cnpj: cite IN RFB 2.229/2024 and its retificação, and pin the misprinted FAQ example (6279241)
- cnpj: say the alphanumeric set is A to Z and lower case is only normalized (30e5409)
- cns: cite the DATASUS validation routines and say that no official source names prefix 5 (8cf60b3)
- context7: list every dataset-backed subpath in the lazy-load rule (c585777)
- context7: list isValidCid10 among the dataset-backed utils to lazy-load (6aa8f00)
- contributors: add kwy404 for the RENAVAM number fix (bcb3e75)
- correct the CEP ranges wording, the legal nature successors and the plate format alias (425bc30)
- cpf: cite the DJE layout for the reserved numbers and say IN RFB 2.172/2024 sets no DV rule (1b28890)
- datasets: name the official versions the NCM, LC 116 and municipality tables match (a603dfb)
- document the number rule of the guarded utils, and fix two JSDoc lines (73cab3c)
- documents: align the docs and examples of the document utilities with the code (b9a1ff4)
- documents: cite the reachable e-Financeira manual and tidy the JSDoc (3deac83)
- each-local-day: describe the scratch date of eachLocalDay (ee6f635)
- fix dead citations and small wording slips in the docs (f193887)
- format-phone,format-cnpj: say no official rule masks a phone or a CNPJ, citing ANPD and BCB (0386232)
- format: cite the LDO rule behind obfuscate, and none for the CNPJ (a3e40fa)
- format: say which phone masks keep 190 and to pad a numeric voter id before masking it (b19d0b7)
- format: state the empty value rule under pad in every formatter (871607b)
- get-boleto-info: state the exact window where an old factor flips to the next cycle (91963e5)
- get-timezone-by-state: cite the decree that sets the zones instead of the daylight saving one (5061f0a)
- get-timezone-by-state: cite the legal source and warn about multi-zone states (ea03a17)
- gtin: cite the version of NT 2021.003 the linked PDF serves (1f41e60)
- gtin: read the prefix from the GS1 tables, not from an unread SEFAZ table (186fa6b)
- gtin: say that rejecting a GTIN of zeros is a rule of this library (5ee6402)
- holidays: cite the DOU texts of the 2024 and 2025 federal calendars for Carnaval (cef0039)
- holidays: list the holidays of 2024 in full and state what isHoliday counts (06f3ab4)
- holidays: name the one-year moves of Piauí's and Tocantins' dates the table leaves out (97561c5)
- holidays: record the state sources a 2026 official-source check left open or ruled out (743be48)
- holidays: say Goiás' dates come from the servants' statute and 26/07 moves every year (0de1f8c)
- holidays: say Santa Catarina's law leaves Saturday open and how the table reads it (4793913)
- holidays: say why Acre's Friday shift is not applied: its decrees apply it unevenly (4b4516f)
- ibs-cbs: cite the 23/06/2026 publication and the final SVRS address (7b6e898)
- ibs-cbs: say that the cst option belongs to isValidClassTrib only (930bba5)
- ie: cite Portaria SEFAZ-MT 59/2025 art. 8º § 1º for the 9 digit Mato Grosso form (75dcd32)
- ie: cite Portaria SEFAZ-TO 676/2002 art. 3º and RICMS-TO art. 90 for Tocantins (7cd13ad)
- ie: cite the three Goiás sources for the prefixes and say where they disagree (1653501)
- ie: correct the RJ, TO and header notes, and add MG and MS notes (a39ceda)
- ie: note the typo in the São Paulo produtor rural example of the SINTEGRA page (6c8dc4a)
- ie: quote both branches of the Amazonas check digit rule as the library reads them (c46e1c2)
- ie: say the Goiás check digit follows the 2012 roteiro, not the SINTEGRA page (0fc6bb1)
- ie: say the Mato Grosso do Sul prefix 50 comes from SINTEGRA and SEFAZ-MS, not the norm (6d0d8e5)
- ie: say the Roraima prefix 24 is read from the SINTEGRA examples (9af1673)
- ie: say the SINTEGRA page does not fix the Distrito Federal prefix 07 (1698d4a)
- keys: document the VIN separators, the progressive plate mask and quote the outputs (fc110aa)
- keys: move the norm notes above @param in the processo and license plate JSDoc (3fa9fe1)
- license-plate: name IsValidLicensePlateOptions in the isValidLicensePlate section (ebdecb0)
- license-plate: name the Python format values and list the options type as public (7273f78)
- nfe-key: note that the current CT-e schema gives the GTV-e tpEmis 1 and 2 only (18a9efa)
- nfe-key: note the cNF rule for older keys and the unchecked issuer document (425fd98)
- nfse-key: leave out the TSChaveNFSe letter window note (3d9f1a8)
- nfse-key: say the alphanumeric key schema is the restricted-production bundle (c1fdf48)
- nfse-key: say the key accepts the mask between its fields (13535f1)
- nfse-key: state that no official rule sets the check digit of a key with letters (5d8dd32)
- obfuscate: cite art. 163 of the LDO 2026 (Lei 15.321/2025) next to art. 149 of the LDO 2022 (1c6e54f)
- passport: say the Polícia Federal FAQ is the only official source of the number layout (9806856)
- payments: state the limits of the bank and currency checks (64b0d18)
- phone: document the Anatel numbering rules scheduled for 1 March 2027 (6864ed3)
- pis: say that no official document publishes the PIS/PASEP/NIS check digit weights (5f1ee50)
- pix-key: drop the claim that 2.4.0 accepted an e-mail key with & (cb7786e)
- pix-payload: say that no BCB manual sets the case of the CRC or of "BR" (bfd183b)
- pix: describe pointOfInitiation and the random key by what the sources say (842d556)
- processo-juridico: give the check digits' true range and the Anexo II example in J.TR form (843b3fd)
- processo-juridico: place the check digit algorithm in Anexo VIII of Res. CNJ 65/2008 (3a68e6a)
- renavam: cite Portaria DENATRAN 27/2013, the official source of the 11 digit code and its DV (fd5a8fe)
- say the public API is checked against the last release (c0615fd)
- schema: validate an object in the Hono route and name the vee-validate version (6380311)
- service-phone: rest the 0800-like numbers on Resolução 749/2022 arts. 18 and 28 (930b5ae)
- state the non-negative safe integer rule for numbers among the conventions (595664b)
- state-city: build the guide on getMunicipalities and fix the A, B, A race (829700d)
- suframa: say reading an 8 digit ISUF as a lost leading zero is this library's inference (ed23fb9)
- suframa: say the NF-e MOC, not the SUFRAMA, is the source of the layout and check digit (21e2fe7)
- types: keep the JSDoc of exported type keys to one line (d06354d)
- update the bundle sizes after the tree-shaking work (c5b1b7d)
- vin: stop attributing the I, O and Q exclusion to Res. CONTRAN 968/2022 (e6fcbb0)
- voter-id: quote Res. TSE 23.659/2021 art. 36 literally and flag the SP/MG rule as unsourced (706da94)
- words: describe the e, de and zero reais rules of the words functions (9c14768)