parseSpanishPostcodefunction
Takes a postcode apart: the province it is in, and whether GeoNames' list has it.
Import it
import { parseSpanishPostcode } from "@johnmorrisdotca/address-plus/es";
Definition
function parseSpanishPostcode(postcode: string): PostcodeLookup
Parameters
| Name | Type | Description |
|---|---|---|
postcode | string | The postcode. |
Returns
PostcodeLookup
The postcode, its province (when it has the shape) and whether the list has it.
Examples
import { parseSpanishPostcode } from "@johnmorrisdotca/address-plus/es";
console.log(parseSpanishPostcode("28014"));
// → {"postcode":"28014","region":"M","known":true}{ postcode: '28014', region: 'M', known: true }What it prints (run when this page was built)