bills library

Electricity bill reference numbers, customer IDs and K-Electric account numbers, and gas consumer numbers.

Same as the pakdatakit/bills entry point of the npm package.

Classes

ElectricityRef
Result of parseElectricityRef.

Enums

ElectricityRefType
Kind of electricity bill identifier. Used by ElectricityRef.
GasCompany
A gas company whose consumer number format is published.

Functions

parseElectricityRef(String input) → ElectricityRef?
Parses a Pakistani electricity bill identifier: a DISCO reference number, a DISCO customer ID or a K-Electric account number.
validateElectricityRef(String input) → bool
Validates a Pakistani electricity bill identifier. See parseElectricityRef.
validateGasConsumerNumber(String input, String company) → bool
Validates a gas bill consumer number: 11 digits for SNGPL, 10 digits for SSGC, as their bill pages ask for (retrieved 2026-11-18; see DATA.md in the repository). No check digit is published, so only the format is checked.