本文へ移動

address-plusアドレスプラス

住所を端末の中で解析・確認・整形・比較し、国のモジュールや任意のフォームの入力欄を使えます。

address-plusは、parse-addressの使い方を広げ、型付きの結果、確認、書式、国のモジュールを加えます。 名前について(英語)

目次

リファレンス · ドイツのモジュール

GermanAddressFields型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The fields an address in Germany fills beside the shared ones. The shared fields keep their meaning: street is the whole name of the street as written (Hauptstraße, Berliner Str., Am Markt), number the house number with its letter (12a) or range (12-14), secUnitType and secUnitNum a flat (Wohnung 12), a box (Postfach 12 34 56) or a Packstation, floorType and floor a floor (OG and 2), building a wing, a house or a name (Hinterhaus, Haus B), locality the Ortsteil, city the place, state the Land's code and zip the postcode.

インポート

import type { GermanAddressFields } from "@johnmorrisdotca/address-plus/de";

ほかのエクスポート元: @johnmorrisdotca/address-plus

定義

interface GermanAddressFields {
    careOf?: string;
}

メンバー

名前型説明
careOf (省略可)string | undefined

例

import { parseGermanAddress } from "@johnmorrisdotca/address-plus/de";
import type { GermanAddressFields } from "@johnmorrisdotca/address-plus/de";

console.log(parseGermanAddress("c/o Weber, Hauptstraße 12a, 10115 Berlin")?.careOf);
// → "Weber"
Weber

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/address-plus 1.7.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。