DeutschePostFormattingOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Options for formatDeutschePost.
インポート
import type { DeutschePostFormattingOptions } from "@johnmorrisdotca/address-plus/de";
定義
interface DeutschePostFormattingOptions {
includeCountry?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
includeCountry (省略可) | boolean | undefined |
例
import { formatDeutschePost, parseGermanAddress } from "@johnmorrisdotca/address-plus/de";
import type { DeutschePostFormattingOptions } from "@johnmorrisdotca/address-plus/de";
const parsedAddress1=parseGermanAddress("Hauptstr. 12, 10115 Berlin");
if (!parsedAddress1) throw new Error("The example address did not parse.");
console.log(formatDeutschePost(parsedAddress1, { includeCountry: true }).lines);
// → ["Hauptstr. 12","10115 Berlin","DEUTSCHLAND"][ 'Hauptstr. 12', '10115 Berlin', 'DEUTSCHLAND' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。