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