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 · Satellites: orbital elements in, positions out

foldKanafunction

Fold text for a Japanese search: width and compatibility forms (NFKC: half-width katakana becomes full-width), hiragana to katakana, and a small kana (ッ, ャ, ァ) to its full-size one. The long-vowel mark ー is left as it is, and so is everything that is not kana (letter case is the caller's, as it is for any search). Put it on both sides of a comparison: foldKana("はっぶる") === foldKana("ハッブル"), and ハッブル is also ハツブル after it, so a reader who types a small kana as a full-size one still finds it.

Import it

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

Definition

function foldKana(text: string): string

Parameters

NameTypeDescription
textstring

What was typed, or a name to compare it with.

Returns

string

The folded text.

Examples

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

console.log(foldKana("はっぶる") === foldKana("ハッブル"));
console.log(foldKana("ほし ー"));
true
ホシ ー

What it prints (run when this page was built)

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