nearStarsfunction
The star systems within 20 light-years, nearest first: 73 of them, from Alpha Centauri at 4.3 to a faint red dwarf at 19.8. The primary star's distance is known to 10% or better.
Import it
import { nearStars } from "@johnmorrisdotca/hoshi-stars/near-stars";
Definition
function nearStars(options?: { maxLightYears?: number; }): NearStar[]
Parameters
| Name | Type | Description |
|---|---|---|
options (optional) | { maxLightYears?: number; } |
|
Returns
NearStar[]
A fresh array of the shared, frozen systems.
Examples
import { nearStars } from "@johnmorrisdotca/hoshi-stars/near-stars";
console.log(nearStars().length, nearStars({ maxLightYears: 10 }).map((s) => s.name));73 [
'Alpha Centauri',
"Barnard's Star",
'Wolf 359',
'Lalande 21185',
'Sirius',
'UV Ceti',
'Ross 154'
]What it prints (run when this page was built)