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