Bunch of utilities useful when working with PESEL numbers
- Simple API
- 0 dependencies
- Well tested
- Uses 4-step PESEL validation (lenght + year + month + checksum)
- Written in TypeScript
$ npm install pesel-utils
const {isValidPesel, checkGender, getDateOfBirth} = require('pesel-utils');
isValidPesel('371340514609'); //=> false
checkGender('69021818876'); //=> 'male'
getDateOfBirth('75040373939'); //=> '1975/04/03'
Returns a boolean
of whether the provided PESEL is valid or not.
Type: string
PESEL you want to check.
Returns a string
with gender (male
or female
).
Type: string
PESEL you want to check.
Returns a string
with date of birth, extracted from PESEL (in ISO 8601 format).
Type: string
PESEL you want to check.
MIT © Antoni Kepinski