getProvinceFromSpanishPostcode関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The province a postcode is in, as its ISO 3166-2 code without ES-: the province its first two digits name.
インポート
import { getProvinceFromSpanishPostcode } from "@johnmorrisdotca/address-plus/es";
定義
function getProvinceFromSpanishPostcode(postcode: string): string | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
postcode | string | The postcode. |
戻り値
string | undefined
The province's code (M for Madrid), or undefined when the postcode has not the shape.
例
import { getProvinceFromSpanishPostcode } from "@johnmorrisdotca/address-plus/es";
console.log(["28014", "08001", "41001", "35001", "1234"].map(getProvinceFromSpanishPostcode));
// → ["M","B","SE","GC",null][ 'M', 'B', 'SE', 'GC', undefined ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。