Reference · Rockets, variants, parts and the fit check
cleanShowfunction
A value from outside as something that can be shown.
Import it
import { cleanShow } from "@johnmorrisdotca/uchusen-rockets";
Definition
function cleanShow(value: unknown, slots: readonly string[]): string
Parameters
| Name | Type | Description |
|---|---|---|
value | unknown | Anything. |
slots | readonly string[] | The variant's slots. |
Returns
string
The value if it can be shown, and the first choice (together) for anything else.
Examples
import { cleanShow, variantOf } from "@johnmorrisdotca/uchusen-rockets";
const slots = variantOf("falcon-9", "block-5")?.slots ?? [];
console.log(cleanShow("first-stage", slots), cleanShow("nonsense", slots));first-stage togetherWhat it prints (run when this page was built)