pakdatakit/quality
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| AddressScore | Result of scoreAddress. |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| AddressPart | A part of a delivery address that scoreAddress looks for. |
| PhoneRiskFlag | A reason to double-check a phone number given for a delivery. |
Variables
Section titled “Variables”| Variable | Description |
|---|---|
| ADDRESS_WEIGHTS | Points for each part of an address. They add up to 100. A postal code scores in full only when it is a known post office code; an unknown one scores 5. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| scoreAddress | Scores how complete a free-form Pakistani delivery address is, for cash on delivery and other courier use. |
| phoneRiskSignals | Flags a phone number that a courier cannot reach by SMS or call, or that looks made up. Pure heuristics on the number itself: no list of real numbers, no personal data, no network call. |