Reference · Rockets, variants, parts and the fit check
craftNamefunction
The words that name one craft in a picture of several: its name, then its length in metres, such as "Saturn V (Apollo), 110.64 m". A real craft's length is its sourced height when a source gave one; otherwise the model's own height in the picture, tall.
Import it
import { craftName } from "@johnmorrisdotca/uchusen-rockets";
Definition
function craftName(description: Readonly<Description>, tall: number): string
Parameters
| Name | Type | Description |
|---|---|---|
description | Readonly<Description> | The craft's rocket and variant. |
tall | number | The height of its model, in metres, used when no source gave its length. |
Returns
string
The label.
Examples
import { craftName } from "@johnmorrisdotca/uchusen-rockets";
console.log(craftName({ rocket: "saturn-v", variant: "saturn-v" }, 110.6));Saturn V (Apollo), 110.64 mWhat it prints (run when this page was built)