|
35 | 35 | "Public functions never throw on bad input (null, undefined, wrong type): isValid* return false, format* and parse* return '', single-item getters return null, list getters return [].", |
36 | 36 | "The only utils that reject are the async getAddressInfoByCep (GetAddressInfoByCepError: NotFound, Validation, Service) and getCepInfoByAddress (GetCepInfoByAddressError: NotFound, Validation).", |
37 | 37 | "isValid* accept the usual mask characters and whitespace, so there is no need to strip formatting first; format* return the masked string and parse* return the unmasked value.", |
38 | | - "Alphanumeric CNPJ (IN RFB 2.229/2024): pass { version: 2 } to isValidCnpj, formatCnpj and parseCnpj, and call generateCnpj(2) or generateCnpj({ version: 2 }).", |
39 | | - "CNPJ version 2 accepts both numeric and alphanumeric values and folds lowercase to uppercase; the default version 1 is numeric only, so parseCnpj without { version: 2 } drops the letters.", |
| 38 | + "Alphanumeric CNPJ (IN RFB 2.229/2024): set the version option to 2 in isValidCnpj, formatCnpj and parseCnpj (second argument, an options object), and call generateCnpj(2) to generate one.", |
| 39 | + "CNPJ version 2 accepts both numeric and alphanumeric values and folds lowercase to uppercase; the default version 1 is numeric only, so parseCnpj without the version option set to 2 drops the letters.", |
40 | 40 | "CNPJ version 2 has no reserved-value list: a repeated-character alphanumeric base that passes the checksum is valid, unlike the repeated numeric values that version 1 rejects.", |
41 | 41 | "The 1.x aliases formatCEP, formatCNPJ, formatCPF, generateCNPJ, generateCPF, isValidCEP, isValidCNPJ, isValidCPF, isValidIE and isValidPIS are deprecated; use the camelCase names.", |
42 | 42 | "Deprecated since 2.4.0: getCities (use getMunicipalities, which returns { name, code } objects) and the async getMunicipality (use the synchronous, offline getMunicipalityByCode).", |
|
0 commit comments