Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · Parsing, formatting and shared types

parseIntersectionsBatchfunction

Parses many intersections with parseIntersection, and reports which failed and how long it took.

Import it

import { parseIntersectionsBatch } from "@johnmorrisdotca/address-plus";

Definition

function parseIntersectionsBatch(addresses: string[], options?: BatchParseOptions): BatchParseResult<ParsedIntersection>

Parameters

NameTypeDescription
addressesstring[]

The intersections, one string each.

options (optional)BatchParseOptions | undefined

How to parse, plus the batch settings (see BatchParseOptions).

Returns

BatchParseResult<ParsedIntersection>

The results in order (null for a failure), the errors, and the counts and timing.

Examples

import { parseIntersectionsBatch } from "@johnmorrisdotca/address-plus";

console.log(parseIntersectionsBatch(["Yonge St and Bloor St, Toronto, ON"]).stats.successful);
// → 1
1

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.