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 · Sky cultures: the figure and culture types, and your own culture

Culturetype

A sky culture: a named set of figures. Import one from its own entry point and pass it to constellations, constellation, starsIn, figures and figureOf.

Import it

import type { Culture } from "@johnmorrisdotca/hoshi-stars/culture";

Also exported from: @johnmorrisdotca/hoshi-stars/sky-labels

Definition

interface Culture {
    readonly id: string;
    readonly names: Readonly<{
        en: string;
        ja: string;
    }>;
    asterisms(): readonly Asterism[];
    find(text: string): Asterism | undefined;
}

Members

NameTypeDescription
idstring

A short key for an address or a setting: western, japanese, chinese.

namesReadonly<{ en: string; ja: string; }>

The culture's name in English and in Japanese.

asterisms(): readonly Asterism[]

The culture's figures, in a fixed order. Parsed once.

find(text: string): Asterism | undefined

One figure by any of its names (ignoring case, accents, tone marks and katakana against hiragana), its reading or its id; undefined where there is none, or where the text names two figures.

Examples

import { japanese } from "@johnmorrisdotca/hoshi-stars/cultures/japanese";

console.log(japanese.id, japanese.names.ja, japanese.asterisms().length);
japanese 日本の伝統 106

What it prints (run when this page was built)

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