本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス · 名前の一覧の小さな最初のかたまり (固有名のある335個の星と110個のメシエ天体。全体と同じ行で、最初に約20 kBだけ読み込む検索ボックス用)

searchNames関数

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

The rows of the small chunk whose names match what was typed: those with a name that starts with it first (an exact name before those), then those that contain it, each by weight. A star without a common name is not here: a page that wants it loads /names after this.

インポート

import { searchNames } from "@johnmorrisdotca/hoshi-stars/names/named";

定義

function searchNames(text: string, options?: { limit?: number; kinds?: readonly NameKind[]; }): NameRow[]

引数

名前型説明
textstring

What was typed.

options (省略可){ limit?: number; kinds?: readonly NameKind[]; }

limit (20 by default) and kinds.

戻り値

NameRow[]

The rows, best first.

例

import { searchNames } from "@johnmorrisdotca/hoshi-stars/names/named";

console.log(searchNames("andromeda", { limit: 3 }).map((row) => row.id));
[ 'm31', 'alpheratz', 'mirach' ]

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

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

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