PESEL
Validates and parses Poland’s universal citizen identifier. Extracts birth date, gender, century, age, and ordinal number directly from the number.
@slashlab/numerik-js is a zero-dependency TypeScript library. Validation tells you why input failed, not just that it failed. Types are bundled — no @types/ package needed.
PESEL
Validates and parses Poland’s universal citizen identifier. Extracts birth date, gender, century, age, and ordinal number directly from the number.
ID Card
Validates Polish national identity card numbers (dowód osobisty). Three-letter series plus six digits, validated with the ICAO 9303 weighted checksum.
Passport
Validates Polish passport numbers. Two-letter series plus seven digits, validated with the same ICAO 9303 algorithm used in travel documents globally.
NIP
Validates tax identification numbers for individuals and legal entities. Returns the issuing tax office code and formatted display form.
VAT-EU
Validates intra-EU VAT numbers for Polish taxpayers (PL + NIP). Strips the country prefix and applies the NIP MOD-11 algorithm. Returns the NIP and formatted display form.
REGON
Handles both 9-digit (individual) and 14-digit (legal entity with local unit) REGON numbers, including multi-stage checksum validation.
KRS
Validates court register numbers with automatic zero-padding normalisation. Documents the offline vs. online verification limitation.
NRB
Validates Polish bank account numbers using the MOD-97 checksum. Accepts raw, spaced, and IBAN-prefixed formats. Returns sort code, bank code, and account number.
IBAN
Validates Polish IBANs (PL + NRB). Requires the country prefix and applies MOD-97. Returns NRB, sort code, bank code, and account number.
import { Numerik, Gender } from '@slashlab/numerik-js'
// Simple boolean checkNumerik.pesel().isValid('92060512186') // trueNumerik.nip().isValid('5260250274') // true
// Rich result with failure detailsconst result = Numerik.pesel().validate('92060512185') // wrong checksum digitresult.isFailed() // trueresult.getFirstFailure()?.reason // ValidationFailureReason.InvalidChecksum
// Parse to a value objectconst pesel = Numerik.pesel().parse('92060512186')pesel.getBirthDate() // Date — 1992-06-05pesel.getGender() // Gender.Femalepesel.getAge() // calculated from todaypesel.isAdult() // true@types/ needed.ValidationFailureReason enum covers format, checksum, encoded-date, and semantic failures./zod sub-path export (requires zod peer dependency).