本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · 人工衛星: 軌道要素から位置を計算

foldKana関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 { foldKana } from "@johnmorrisdotca/chikyu-earth/satellites";

定義

function foldKana(text: string): string

引数

名前型説明
textstring

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

戻り値

string

The folded text.

例

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

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。