Skip to content

feat: implement some extra utilities - #477

Merged
hyanmandian merged 3 commits into
mainfrom
sync-code-with-python-lib
Apr 9, 2026
Merged

hyanmandian merged 3 commits into
mainfrom
sync-code-with-python-lib

Conversation

@hyanmandian

Copy link
Copy Markdown
Member

This PR syncs the JavaScript package with utilities already available in the Python library, expanding the public API with a broader set of Brazil-
specific formatters, generators, parsers, validators, and lookup helpers.

What Changed

  • Added CNH utilities: formatCnh, isValidCnh, generateCnh, and parseCnh
  • Added voter ID utilities: formatVoterId, isValidVoterId, generateVoterId, and parseVoterId
  • Added legal nature utilities: formatLegalNature, isValidLegalNature, generateLegalNature, parseLegalNature, and getLegalNatures
  • Added license plate utilities: formatLicensePlate, generateLicensePlate, parseLicensePlate, and getFormatLicensePlate
  • Added lookup helpers: getCepInfoByAddress, getMunicipality, and isHoliday
  • Added generators for additional document/data types: generateCep, generatePhone, generatePis, and generateProcessoJuridico
  • Updated public exports in src/index.ts and coverage in src/index.test.ts
  • Documented all new utilities in both English and Portuguese docs

@hyanmandian
hyanmandian merged commit ba7ee79 into main Apr 9, 2026
11 checks passed
@hyanmandian
hyanmandian deleted the sync-code-with-python-lib branch September 19, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant