Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · /nl

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"
A

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.10.2.