exoplanetHostsfunction
The host stars of confirmed exoplanets, nearest first: the stars within 50 light-years whose distance the Yale tables give to 10% or better, the stars with an IAU proper name among those, and TRAPPIST-1.
Import it
import { exoplanetHosts } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
Definition
function exoplanetHosts(options?: { maxLightYears?: number; minPlanets?: number; }): ExoplanetHost[]
Parameters
| Name | Type | Description |
|---|---|---|
options (optional) | { maxLightYears?: number; minPlanets?: number; } |
|
Returns
ExoplanetHost[]
A fresh array of the shared, frozen hosts.
Examples
import { exoplanetHosts } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
console.log(exoplanetHosts({ minPlanets: 4 }).map((h) => `${h.name} ${h.planetCount}`));[
"Barnard's Star 4",
'Lacaille 9352 4',
'GJ 876 4',
'HD 219134 4',
'TRAPPIST-1 7',
'Copernicus 5'
]What it prints (run when this page was built)