Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The realistic Earth's pure parts

readCountryNamesfunction

Reads the country-names attribute: absent (or off) is none, bare is 40 names at most, a number is that many at most (1 to 120).

Import it

import { readCountryNames } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

function readCountryNames(value: string | null): number | null

Parameters

NameTypeDescription
valuestring | null

The attribute's value, or null when it is absent.

Returns

number | null

How many names at most, or null for none.

Examples

import { readCountryNames } from "@johnmorrisdotca/chikyu-earth/realistic";

console.log(readCountryNames(null), readCountryNames(""), readCountryNames("12"), readCountryNames("500"), readCountryNames("off"));
null 40 12 120 null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.