starGradefunction
A star's grade alone, worked out without building the whole record: the same answer as starAccuracy(star).grade, cheap enough to filter thousands of stars with.
Import it
import { starGrade } from "@johnmorrisdotca/hoshi-stars/accuracy";
Definition
function starGrade(star: Star | NearbyStar): StarGrade
Parameters
| Name | Type | Description |
|---|---|---|
star | Star | NearbyStar | A bright star or a nearby star. |
Returns
StarGrade
"A", "B" or "C" by GRADE_RULES.
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { starGrade } from "@johnmorrisdotca/hoshi-stars/accuracy";
console.log(starGrade(starByName("Sirius")!));AWhat it prints (run when this page was built)