v1.0.0
First Release: @ppasmik/birth-number-utils v1.0.0
We are excited to announce the first release of @ppasmik/birth-number-utils, a TypeScript/JavaScript library designed to generate and validate Czech and Slovak birth numbers (rodné číslo).
Features
- Birth Number Generators: Generate valid Czech and Slovak birth numbers with customizable options like gender, date of birth, and format.
- Validation: Validate birth numbers for format, modulo 11 compliance, and real dates.
- Parsing: Extract meaningful information such as gender and birth date from a valid birth number.
- Full TypeScript Support: Includes type definitions for seamless integration.
- Lightweight: Utilizes
dayjs
for efficient and lightweight date handling.
Highlights
-
Main Functions:
isValidBirthNumber
: Quickly validate a birth number.parseBirthNumber
: Parse a birth number to retrieve the birth date and gender.generateCzechBirthNumber
: Generate valid Czech birth numbers.generateSlovakBirthNumber
: Generate valid Slovak birth numbers.
-
Flexible: Supports both formatted (
955123/1234
) and raw (9551231234
) birth number formats. -
Robust Validation: Ensures compliance with both Czech and Slovak laws, including leap years and historical exceptions.
Installation
npm install @ppasmik/birth-number-utils