Reference
Country facts
import { … } from "@johnmorrisdotca/kuni/facts";
8.5 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
allFacts | function | 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 | type | The facts about one country, from the /facts entry: plain numbers and codes, null where a source has none. |
distanceKm | function | The great-circle distance between two points, in kilometres, on a sphere of the earth's mean radius (6,371 km). |
DrivingSide | type | The side of the road a country drives on. |
facts | function | The facts about one country, by its alpha-2 code in either case. |
FACTS_READ | constant | The day the Wikidata snapshot was read: every figure in /facts is as Wikidata gave it on this day. |
HourCycle | type | 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 | type | A point on the earth, in degrees: north and east are positive. |
MeasurementSystem | type | The system of measurement in everyday use, as CLDR writes it: the United States' and Britain's are their own. |
PaperSize | type | The paper size in everyday use, as CLDR writes it. |
WeekStart | type | The first day of the week on a calendar there, as CLDR writes it. |