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 · How well each value of a star is known: the source and error of its position, magnitude, colour, parallax and proper motion, and a grade A, B or C

checkGradefunction

Whether a value is a grade: "A", "B" or "C". Throws a RangeError that names the option when it is not, which is what minGrade does with a bad value.

Import it

import { checkGrade } from "@johnmorrisdotca/hoshi-stars/accuracy";

Definition

function checkGrade(value: unknown, name: string): StarGrade

Parameters

NameTypeDescription
valueunknown

Anything.

namestring

The option's name, for the message.

Returns

StarGrade

The grade, typed.

Examples

import { checkGrade } from "@johnmorrisdotca/hoshi-stars/accuracy";

console.log(checkGrade("B", "minGrade"));
B

What it prints (run when this page was built)

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