netherlandsconstant
The Netherlands' module, for parseLocation and validateAddress: pass it in countries, and an address that ends
with the Netherlands, Nederland or NL, or has a postcode of four digits and two letters and a place on its last line, is
read as Dutch; country: "NL" reads any address as one.
Import it
import { netherlands } from "@johnmorrisdotca/address-plus/nl";
Definition
const netherlands: CountryModule = postcodeCountryModule(dutchSpec, (address) => formatPostNL(address))
Examples
import { parseLocation } from "@johnmorrisdotca/address-plus";
import { netherlands } from "@johnmorrisdotca/address-plus/nl";
console.log(parseLocation("Keizersgracht 123A, 1015 CJ Amsterdam", { countries: [netherlands] })?.numberExtension);
// → "A"AWhat it prints (run when this page was built)