本文へ移動

Chikyu Earth地球

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

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

目次

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

findInCatalogue関数

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

Find catalogue entries by name, group name, NORAD number, Japanese name or a group's Japanese label: "hubble", "hst", "25544", "weather" or "ハッブル". An English or numeric query ignores case, spaces and punctuation, as before. Japanese is folded on both sides: letter case, character width (NFKC) and kana (foldKana: hiragana to katakana, small kana to full-size, the long-vowel mark left alone), so はっぶる finds ハッブル; kanji are matched as typed. The width fold is applied before the English comparison too. A name that starts with the text comes before one that only has it inside.

インポート

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

定義

function findInCatalogue(text: string, limit?: number): CatalogueEntry[]

引数

名前型説明
textstring

What the reader typed.

limit (省略可)number

The most entries to give back (8 by default).

戻り値

CatalogueEntry[]

The matching entries, best first; none for empty text.

例

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

console.log(findInCatalogue("sentinel 2").map((entry) => entry.name));
console.log(findInCatalogue("ハッブル").map((entry) => entry.name));
[ 'SENTINEL-2A', 'SENTINEL-2B' ]
[ 'HST' ]

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

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

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