Skip to the content

Kuni国

Look up countries, codes, names and subdivisions, load country data on demand and mount a native country card.

Kuni (国) is Japanese for a country. About the name

Contents

Reference · Places outside ISO 3166-1

reservedPlacesfunction

Every place outside ISO 3166-1, in order of its id. Never part of countries(), so a picker does not offer them unless it asks.

Import it

import { reservedPlaces } from "@johnmorrisdotca/kuni/reserved";

Definition

function reservedPlaces(options?: ReservedPlacesOptions): readonly ReservedPlace[]

Parameters

NameTypeDescription
options (optional)ReservedPlacesOptions

kind: only the places of one of RESERVED_KINDS.

Returns

readonly ReservedPlace[]

The places, the list and its objects frozen.

Examples

import { reservedPlaces } from "@johnmorrisdotca/kuni/reserved";

console.log(reservedPlaces().length);                                             // 14
console.log(reservedPlaces({ kind: "iso-reserved" }).map((one) => one.code));     // ["AC", "IC", "EA", "CP", "DG", "CQ", "TA"]
console.log(reservedPlaces({ kind: "de-facto" }).map((one) => one.id));           // ["artsakh", "sahrawi-republic", "somaliland", "transnistria"]
14
[
  'AC', 'IC',
  'EA', 'CP',
  'DG', 'CQ',
  'TA'
]
[ 'artsakh', 'sahrawi-republic', 'somaliland', 'transnistria' ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kuni 1.19.0.