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

BatchParseErrortype

One address a batch could not parse: its index, the input and the reason.

Import it

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

Definition

interface BatchParseError {
    index: number;
    error: string;
    input: string;
}

Members

NameTypeDescription
indexnumber
errorstring
inputstring

Examples

import { parseLocationsBatch } from "@johnmorrisdotca/address-plus";
import type { BatchParseError } from "@johnmorrisdotca/address-plus";

console.log(parseLocationsBatch([""]).errors[0].index);
// → 0
0

What it prints (run when this page was built)

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