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

readCityNamesfunction

Reads the city-names attribute: absent is off, bare is 24 names, a number is that many names (1 to 80).

Import it

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

Definition

function readCityNames(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 { readCityNames } from "@johnmorrisdotca/chikyu-earth/realistic";

console.log(readCityNames(null), readCityNames(""), readCityNames("12"), readCityNames("500"), readCityNames("many"));
null 24 12 80 24

What it prints (run when this page was built)

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