Reference · Rockets, variants, parts and the fit check
partIdOffunction
A part's name for a rocket's slot in a variant.
Import it
import { partIdOf } from "@johnmorrisdotca/uchusen-rockets";
Definition
function partIdOf(rocket: string, variant: string, slot: string): string
Parameters
| Name | Type | Description |
|---|---|---|
rocket | string | A rocket's id. |
variant | string | A variant's id. |
slot | string | A slot name. |
Returns
string
The id of the part that stands in that slot.
Examples
import { partIdOf } from "@johnmorrisdotca/uchusen-rockets";
console.log(partIdOf("starship", "v3", "booster"));starship-v3-boosterWhat it prints (run when this page was built)