Reference · Parsing, formatting and shared types
CA_PROVINCE_NAMES_FRconstant
Every Canadian province and territory by its French name in lower case, to its two-letter code.
Import it
import { CA_PROVINCE_NAMES_FR } from "@johnmorrisdotca/address-plus";
Definition
const CA_PROVINCE_NAMES_FR: Record<string, string> = {
alberta: "AB",
"colombie-britannique": "BC",
manitoba: "MB",
"nouveau-brunswick": "NB",
"terre-neuve-et-labrador": "NL",
"territoires du nord-ouest": "NT",
"nouvelle-écosse": "NS",
nunavut: "NU",
ontario: "ON",
"île-du-prince-édouard": "PE",
québec: "QC",
saskatchewan: "SK",
yukon: "YT",
}
Examples
import { CA_PROVINCE_NAMES_FR } from "@johnmorrisdotca/address-plus";
console.log(CA_PROVINCE_NAMES_FR["colombie-britannique"]);
// → "BC"BCWhat it prints (run when this page was built)