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 · All subdivisions

SubdivisionByNameOptionstype

What subdivisionByName() and subdivisionsByName() may be narrowed to.

Import it

import type { SubdivisionByNameOptions } from "@johnmorrisdotca/kuni/subdivisions";

Definition

interface SubdivisionByNameOptions {
    country?: string;
    level?: Level;
}

Members

NameTypeDescription
country (optional)string | undefined

Only this country's subdivisions (alpha-2, either case).

level (optional)Level | undefined

Only this level; "all", the default, looks at every level.

Examples

import type { SubdivisionByNameOptions } from "@johnmorrisdotca/kuni/subdivisions";
import { country } from "@johnmorrisdotca/kuni";

const value: SubdivisionByNameOptions = {country:"JP",level:1};
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'country', 'level' ]

What it prints (run when this page was built)

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