ProjectsProject Detail

verify-pak-nic

Modern Pakistani CNIC utility toolkit—offline structural validation, parse, format, mask, and test-data generators for Node and browsers.

verify-pak-nic library overview

The Brief

Validate CNIC fields without calling the government.

verify-pak-nic centralizes province digits, family-number rules, and weighted checksum validation so web and API teams stop copying divergent regex.

The library is explicit about scope: offline structure only—never NADRA identity lookup—and ships tree-shakeable ESM/CJS builds with Vitest coverage.

Technical Architecture

Core API

validateCNIC, parseCNIC, formatCNIC, maskCNIC, and generators share one constants + checksum module.

Packaging

tsup dual builds, sideEffects: false, browser and Node export maps.

Privacy

Zero telemetry and no network—safe for regulated forms that only need format checks.

verify-pak-nic library overview

API clarity over magic helpers

Validation returns structured reasons; parse exposes province and gender metadata; README sets compliance expectations up front.

Scope

Offline structure

Ship

npm · MIT

verify-pak-nic validation documentation
Role

Open Source Author

Client

Community library / verify-pak-nic

Date

2026

Collaborators

Solo build

Next Project

ZNPak.ai

View next