limitTextfunction
A limit as the text the address keeps: all, or the light-years rounded (to the step where it is a step, else to 2 significant figures).
Import it
import { limitText } from "@johnmorrisdotca/hoshi-stars/distance";
Definition
function limitText(limit: number): string
Parameters
| Name | Type | Description |
|---|---|---|
limit | number | The limit in light-years, |
Returns
string
The text.
Examples
import { limitText } from "@johnmorrisdotca/hoshi-stars/distance";
console.log(limitText(100), limitText(Infinity), limitText(137.9));100 all 140What it prints (run when this page was built)