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

TestCasetype

Any case in the package's JSON test files.

Import it

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

Definition

type TestCase = AddressParsingTestCase | AddressFormattingTestCase | AddressValidationTestCase | AddressComparisonTestCase | CleanAddressTestCase | BatchProcessingTestCase;

Examples

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

console.log(({ input: "98101", expected: "WA" }).input);
// → "98101"
98101

What it prints (run when this page was built)

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