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

looksDutchfunction

Whether an address is surely Dutch, with no hint: it ends with the Netherlands, Nederland or NL, or its last line is a postcode of four digits and two letters (1015 CJ, never beginning SA, SD or SS) and a place. No other country writes a postcode that way, so no address of another country has that shape.

Import it

import { looksDutch } from "@johnmorrisdotca/address-plus/nl";

Definition

function looksDutch(text: string): boolean

Parameters

NameTypeDescription
textstring

The address as one string.

Returns

boolean

true when the address is Dutch beyond doubt, false otherwise.

Examples

import { looksDutch } from "@johnmorrisdotca/address-plus/nl";

console.log([looksDutch("Keizersgracht 123, 1015 CJ Amsterdam"), looksDutch("123 Main St, Seattle, WA 98101")]);
// → [true,false]
[ true, false ]

What it prints (run when this page was built)

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