stars関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The stars to a magnitude, brightest first. The catalogue stops at magnitude 6.0, so the default is all 5,080.
インポート
import { stars } from "@johnmorrisdotca/hoshi-stars";
定義
function stars(options?: { magnitude?: number; }): Star[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
options (省略可) | { magnitude?: number; } |
|
戻り値
Star[]
A fresh array of the shared, frozen stars.
例
import { stars } from "@johnmorrisdotca/hoshi-stars";
console.log(stars().length, stars({ magnitude: 2 }).map((s) => s.name ?? s.designation).slice(0, 3));5080 [ 'Sirius', 'Canopus', 'Arcturus' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。