deepSkyRowfunction
The row of a deep-sky object. The id is its Messier number, else its NGC, else its IC number, without spaces and in lower case (m31, ngc7000, ic434).
Import it
import { deepSkyRow } from "@johnmorrisdotca/hoshi-stars/names";
Also exported from: @johnmorrisdotca/hoshi-stars/names/named
Definition
function deepSkyRow(object: DeepSkyObject, constellations: ReadonlyMap<string, NameConstellation>): NameRow
Parameters
| Name | Type | Description |
|---|---|---|
object | DeepSkyObject | A deep-sky object from |
constellations | ReadonlyMap<string, NameConstellation> | The constellations by abbreviation, for the names of the one it lies in. |
Returns
NameRow
The row.
Examples
import { constellations } from "@johnmorrisdotca/hoshi-stars/constellations";
import { deepSkyObject } from "@johnmorrisdotca/hoshi-stars/deep-sky";
import { deepSkyRow } from "@johnmorrisdotca/hoshi-stars/names";
const byAbbreviation = new Map(constellations().map((c) => [c.abbreviation, c]));
console.log(deepSkyRow(deepSkyObject("M31")!, byAbbreviation).id);m31What it prints (run when this page was built)