parseIndianPostcodefunction
Takes a PIN code apart: the state it is in, and whether GeoNames' list has it.
Import it
import { parseIndianPostcode } from "@johnmorrisdotca/address-plus/in";
Definition
function parseIndianPostcode(postcode: string): PostcodeLookup
Parameters
| Name | Type | Description |
|---|---|---|
postcode | string | The PIN code. |
Returns
PostcodeLookup
The PIN code, its state (when the list has it) and whether the list has it.
Examples
import { parseIndianPostcode } from "@johnmorrisdotca/address-plus/in";
console.log(parseIndianPostcode("560 038"));
// → {"postcode":"560038","region":"KA","known":true}{ postcode: '560038', region: 'KA', known: true }What it prints (run when this page was built)