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
| Name | Type | Description |
|---|---|---|
postcode | string | 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)