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