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 · Names on the brightest stars and the constellation figures as faint lines, for a sky you draw yourself: a count or a magnitude, the figure under the pointer at full strength, a body that covers part of the sky, and a look set by settings alone

starNamesFromAttributesfunction

Settings from the two attributes a page offers, star-names (a count) and star-names-magnitude (a limit), read as text. Off when neither is there: names are never on unless asked. star-names with no value ("") asks for 10; a count of 0, a negative or text that is not a number asks for none.

Import it

import { starNamesFromAttributes } from "@johnmorrisdotca/hoshi-stars/sky-labels";

Definition

function starNamesFromAttributes(count: string | null | undefined, magnitude: string | null | undefined): StarNamesSettings | undefined

Parameters

NameTypeDescription
countstring | null | undefined

The value of star-names, or null when the attribute is missing.

magnitudestring | null | undefined

The value of star-names-magnitude, or null when it is missing.

Returns

StarNamesSettings | undefined

The settings, or undefined when names are off.

Examples

import { starNamesFromAttributes } from "@johnmorrisdotca/hoshi-stars/sky-labels";

console.log(starNamesFromAttributes("12", null), starNamesFromAttributes(null, "1.5"), starNamesFromAttributes(null, null));
{ count: 12 } { magnitude: 1.5 } undefined

What it prints (run when this page was built)

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