nameRowByIdfunction
One row of the small chunk by its id (betelgeuse, m31): the same row /names gives for that id; undefined for a star without a common name (alpha-centauri, hr-1234), which is in /names.
Import it
import { nameRowById } from "@johnmorrisdotca/hoshi-stars/names/named";
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/named";
console.log(nameRowById("m31")?.name.en, nameRowById("hr-1234"));Andromeda Galaxy undefinedWhat it prints (run when this page was built)