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

getProvinceFromKoreanPostcodefunction

The province or metropolitan city a postcode is in, by its ISO 3166-2 code without KR- (11 for Seoul).

Import it

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

Definition

function getProvinceFromKoreanPostcode(postcode: string): string | undefined

Parameters

NameTypeDescription
postcodestring

The postcode.

Returns

string | undefined

The province's code, or undefined when the list does not have the postcode.

Examples

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

console.log(["04524", "48058", "63000", "16490", "00000"].map(getProvinceFromKoreanPostcode));
// → ["11","26","49","41",null]
[ '11', '26', '49', '41', undefined ]

What it prints (run when this page was built)

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