nameRowByIdfunction
One row by its id (betelgeuse, alpha-orionis, hr-1234, m31): the reverse of the id every row carries.
Import it
import { nameRowById } from "@johnmorrisdotca/hoshi-stars/names";
Definition
function nameRowById(id: string): NameRow | undefined
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The id. |
Returns
NameRow | undefined
The row, or undefined.
Examples
import { nameRowById } from "@johnmorrisdotca/hoshi-stars/names";
console.log(nameRowById("m31")?.name.en, nameRowById("nothing"));Andromeda Galaxy undefinedWhat it prints (run when this page was built)