BatchParseOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Options for the batch parsers: the parse options, plus whether to stop at the first error and whether to include the statistics.
インポート
import type { BatchParseOptions } from "@johnmorrisdotca/address-plus";
定義
interface BatchParseOptions extends ParseOptions {
stopOnError?: boolean;
parallel?: boolean;
chunkSize?: number;
includeStats?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
stopOnError (省略可) | boolean | undefined | |
parallel (省略可) | boolean | undefined | |
chunkSize (省略可) | number | undefined | |
includeStats (省略可) | boolean | undefined | |
country (省略可) | "CA" | "US" | "JP" | "AU" | "GB" | "GY" | "IM" | "JE" | FrenchPostalCountry | "DE" | "GP" | "MQ" | "GF" | "RE" | "YT" | "auto" | undefined | |
countries (省略可) | readonly CountryModule[] | undefined | |
normalize (省略可) | boolean | undefined | |
validatePostalCode (省略可) | boolean | undefined | |
language (省略可) | "auto" | "en" | "fr" | undefined | |
extractFacilities (省略可) | boolean | undefined | |
parseParenthetical (省略可) | boolean | undefined | |
strict (省略可) | boolean | undefined | |
useSnakeCase (省略可) | boolean | undefined |
例
import { parseLocationsBatch } from "@johnmorrisdotca/address-plus";
import type { BatchParseOptions } from "@johnmorrisdotca/address-plus";
console.log(parseLocationsBatch(["123 Main St, Anytown, NY 12345"], { country: "US" }).stats.total);
// → 11出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。