nearbyStarByNamefunction
A nearby star by a name, ignoring case: its common name (Proxima Centauri), a name the catalogue gives it (G 158-027), its designation (33 Psc), GJ 551 or Gliese 551, HD 95735, GCTP 2576 or its 2MASS designation (with or without 2MASS J).
Import it
import { nearbyStarByName } from "@johnmorrisdotca/hoshi-stars/nearby";
Definition
function nearbyStarByName(text: string): NearbyStar | undefined
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The name. |
Returns
NearbyStar | undefined
The star, or undefined.
Examples
import { nearbyStarByName } from "@johnmorrisdotca/hoshi-stars/nearby";
console.log(nearbyStarByName("Barnard's Star")?.gliese, nearbyStarByName("HD 95735")?.name);GJ 699 Lalande 21185What it prints (run when this page was built)