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 · /it

parseItalianPostcodefunction

Takes a postcode apart: the province it is in, and whether GeoNames' list has it.

Import it

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

Definition

function parseItalianPostcode(postcode: string): PostcodeLookup

Parameters

NameTypeDescription
postcodestring

The postcode.

Returns

PostcodeLookup

The postcode, its province (when the list has it) and whether the list has it.

Examples

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

console.log(parseItalianPostcode("20121"));
// → {"postcode":"20121","region":"MI","known":true}
{ postcode: '20121', region: 'MI', known: true }

What it prints (run when this page was built)

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