Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · /chart

normaliseMarkersfunction

Markers from a list: what JSON.parse gave, or any array. An entry with no finite ra and dec (numbers or numeric text) is dropped; right ascension is wrapped to 0 up to 360 and declination held to -90 to 90; text fields are kept as text. A date is kept as given, when it is a text, a number or a Date.

Import it

import { normaliseMarkers } from "@johnmorrisdotca/hoshi-stars/chart";

Definition

function normaliseMarkers(input: unknown): SkyMarker[]

Parameters

NameTypeDescription
inputunknown

The list.

Returns

SkyMarker[]

The markers that could be read.

Examples

import { normaliseMarkers } from "@johnmorrisdotca/hoshi-stars/chart";

console.log(normaliseMarkers(JSON.parse('[{"ra":"370","dec":12,"label":"A"},{"ra":null,"dec":1}]')));
// [ { ra: 10, dec: 12, label: 'A' } ]
[ { ra: 10, dec: 12, label: 'A' } ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.