Reference · Parsing, formatting and shared types
TERRITORY_POSTAL_PREFIXESconstant
The first three characters of each territory's postal codes, since the territories share a first letter.
Import it
import { TERRITORY_POSTAL_PREFIXES } from "@johnmorrisdotca/address-plus";
Definition
const TERRITORY_POSTAL_PREFIXES: Record<string, string[]> = {
NU: ["X0A", "X0B", "X0C"],
NT: ["X0E", "X0G", "X1A"],
YT: ["Y"],
}
Examples
import { TERRITORY_POSTAL_PREFIXES } from "@johnmorrisdotca/address-plus";
console.log(TERRITORY_POSTAL_PREFIXES["NU"]);
// → ["X0A","X0B","X0C"][ 'X0A', 'X0B', 'X0C' ]What it prints (run when this page was built)