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 · The small first chunk of the names index: the 335 stars with a common name and the 110 Messier objects, the same rows as the full index, for a search box that loads about 20 kB first

searchNamesfunction

The rows of the small chunk whose names match what was typed: those with a name that starts with it first (an exact name before those), then those that contain it, each by weight. A star without a common name is not here: a page that wants it loads /names after this.

Import it

import { searchNames } from "@johnmorrisdotca/hoshi-stars/names/named";

Definition

function searchNames(text: string, options?: { limit?: number; kinds?: readonly NameKind[]; }): NameRow[]

Parameters

NameTypeDescription
textstring

What was typed.

options (optional){ limit?: number; kinds?: readonly NameKind[]; }

limit (20 by default) and kinds.

Returns

NameRow[]

The rows, best first.

Examples

import { searchNames } from "@johnmorrisdotca/hoshi-stars/names/named";

console.log(searchNames("andromeda", { limit: 3 }).map((row) => row.id));
[ 'm31', 'alpheratz', 'mirach' ]

What it prints (run when this page was built)

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