リファレンス · 検索ボックス用の名前の一覧 (明るい星とメシエ天体ごとに、英語・日本語の名前、符号、星座、順位の重み、アドレスに使える ID、向ける先を持つ行。IDと名前で引けます)
nameIndex関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
An index over rows: by id, by exact name and by a ranked search. The rows are put in order, largest weight first and the id to break a tie.
インポート
import { nameIndex } from "@johnmorrisdotca/hoshi-stars/names";
ほかのエクスポート元: @johnmorrisdotca/hoshi-stars/names/named, @johnmorrisdotca/hoshi-stars/names/ngc-ic
定義
function nameIndex(input: readonly NameRow[]): NameIndex
引数
| 名前 | 型 | 説明 |
|---|---|---|
input | readonly NameRow[] | The rows. Their ids must be unique. |
戻り値
NameIndex
The lookups.
例
import { nameRows, nameIndex } from "@johnmorrisdotca/hoshi-stars/names";
console.log(nameIndex(nameRows().slice(0, 100)).find("Sirius")?.id);sirius出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。