本文へ移動

Kuni国

国、コード、名前、行政区画を調べ、必要なときに国のデータを読み込み、標準の国のカードを表示できます。

「国(くに)」は、国を表す日本語です。 名前について(英語)

目次

リファレンス

国の情報

import { … } from "@johnmorrisdotca/kuni/facts";

最小化と gzip 圧縮をしたサイズは 8.5 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
allFacts関数The facts about every country, in alpha-2 order: one object for each of the 250 codes, the list and its objects frozen and shared.
CountryFacts型The facts about one country, from the /facts entry: plain numbers and codes, null where a source has none.
distanceKm関数The great-circle distance between two points, in kilometres, on a sphere of the earth's mean radius (6,371 km).
DrivingSide型The side of the road a country drives on.
facts関数The facts about one country, by its alpha-2 code in either case.
FACTS_READ定数The day the Wikidata snapshot was read: every figure in /facts is as Wikidata gave it on this day.
HourCycle型The clock in everyday use, named as an hour cycle is in JavaScript: "h12" is 1 to 12 with AM and PM, "h23" is 0 to 23.
LatLon型A point on the earth, in degrees: north and east are positive.
MeasurementSystem型The system of measurement in everyday use, as CLDR writes it: the United States' and Britain's are their own.
PaperSize型The paper size in everyday use, as CLDR writes it.
WeekStart型The first day of the week on a calendar there, as CLDR writes it.

ソースを見るGitHub で編集@johnmorrisdotca/kuni 1.4.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。