Skip to content

TypeScript API reference

Every function, type and option in the pakdatakit npm package, generated from its source and doc comments. 91 functions in 32 modules. Everything is exported from pakdatakit; each module is also its own entry point (for example pakdatakit/cnic) if you want to import less.

Quick start
import { validateCNIC, formatPhone } from 'pakdatakit';
validateCNIC('42101-1234567-1'); // true
formatPhone('03001234567'); // '+923001234567'

Looking for a function by name? Press / or Ctrl K to search. New here? Start with the install guide or the module guides, which have examples in all five languages.

Identity and contact

Check and format the numbers people type into sign-up and KYC forms.

Banking and payments

Bank accounts, Raast QR codes and utility bills.

Tax and invoicing

Sales tax, income tax on salaries, NTN and FBR digital invoices.

Places and addresses

Provinces, districts, cities, postal codes, couriers and vehicle plates.

Text, numbers and dates

Urdu text, amounts in words, rupee formatting and the Hijri calendar.

Data quality

Score the data you already have, and see which data version you ship.

Schema adapters

The validators as ready-made rules for your schema library. Import from pakdatakit/<library>.