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 globe as an SVG string

cleanStylefunction

A value from outside (an attribute, a query parameter) as a style's name: the default for anything else.

Import it

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

Definition

function cleanStyle(value: unknown): StyleName

Parameters

NameTypeDescription
valueunknown

Anything.

Returns

"line" | "thick"

A valid style name; DEFAULT_STYLE when value names none.

Examples

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

console.log(cleanStyle("thick"), cleanStyle("neon"), cleanStyle(null));
thick line line

What it prints (run when this page was built)

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