リファレンス
/nl
import { … } from "@johnmorrisdotca/address-plus/nl";
最小化と gzip 圧縮をしたサイズは 5.4 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
compareDutchAddresses | 関数 | Compares two addresses in the Netherlands field by field: the street, the house number and its addition, the place and the postcode. |
CountryComparison | 型 | What a country module's comparer returns: whether the two addresses are the same delivery point, and every field that differs once both are in the same form (letter case, punctuation, a street type written out or abbreviated). |
CountryDifference | 型 | One way two addresses differ, as a country module's comparer reports it: the field, and its value in each address after both were put in the same form. |
CountryModule | 型 | A country's address module: its codes, how to tell its addresses apart, and its parser, validator, formatter and comparer. |
CountryValidation | 型 | What a country module's validator returns: the errors and the warnings it found. |
formatPostNL | 関数 | Writes an address in the Netherlands as PostNL asks: who it is care of (t.a.v.), the street with its house number and addition, or the Postbus, then the postcode (four digits, a space, two capitals) and the place, each on its own line. |
FormattedAddress | 型 | A formatted address: its lines, and the same on one line. |
isKnownDutchPostcode | 関数 | Whether CBS's list of four-digit postcode areas for the Netherlands has the digits of a postcode (4,070 areas, from the statistics for 2023). |
isValidDutchPostcode | 関数 | Whether a postcode follows PostNL's shape: four digits (the first not nought) and two letters (not beginning SA, SD or SS), with or without the space between. |
looksDutch | 関数 | 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. |
netherlands | 定数 | 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. |
ParsedAddress | 型 | What parseLocation returns: every part it found, each absent when the address has none. |
parseDutchAddress | 関数 | Parses an address in the Netherlands into the parts PostNL lays out: who it is care of (careOf), a building or name above the street (building), the street in street, the house number in number with its addition in numberExtension (the A of 123A, the 2 of 123-2, bis), a Postbus (secUnitType and secUnitNum), the place in city and the postcode in zip in its canonical form (1015 CJ). |
parseDutchPostcode | 関数 | Takes a postcode apart: its canonical form (1015 CJ) and whether CBS's list has its digits. |
ParseOptions | 型 | Options for every parser: the country, strict postal codes, snake_case keys and the rest. |
PostcodeLookup | 型 | A postcode taken apart: its canonical form, the region it is in (when the country's table has regions), and whether the country's list has it. |
PostcodeRegion | 型 | A region a postcode can be in, as a country's table holds it: its code, its ISO 3166-2 code, and its name in English and in Japanese (from kuni, which takes them from Unicode CLDR and Wikidata). |
PostNLFormattingOptions | 型 | Options for formatPostNL. |
validateDutchAddress | 関数 | Checks an address in the Netherlands: the postcode is four digits and two letters and CBS's list of postcode areas has the digits, and the place and the house number are given. |
ValidationError | 型 | One finding of a validator: the field it is about, its code, a message, and how serious it is. |
ValidationOptions | 型 | Options for the validators: which parts an address must have, which kinds are allowed, and whether a postal code that does not match its region is an error. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。