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

ZIP_CODE_REGEX_PATTERNconstant

The source of ZIP_CODE_PATTERN, for building larger patterns.

Import it

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

Definition

const ZIP_CODE_REGEX_PATTERN: string = String.raw `(\d{5}(?:[-\s]*\d{4})?)`

Examples

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

console.log(ZIP_CODE_REGEX_PATTERN.length > 0);
// → true
true

What it prints (run when this page was built)

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