Reference · Rockets, variants, parts and the fit check
matesfunction
Whether two facing collars mate: the same class, and both there.
Import it
import { mates } from "@johnmorrisdotca/uchusen-rockets";
Definition
function mates(a: CollarClass | undefined, b: CollarClass | undefined): boolean
Parameters
| Name | Type | Description |
|---|---|---|
a | CollarClass | undefined | The collar on one module's end, or undefined for none. |
b | CollarClass | undefined | The collar on the module it meets. |
Returns
boolean
True when both are there and of one class.
Examples
import { mates } from "@johnmorrisdotca/uchusen-rockets";
console.log(mates("L", "L"), mates("L", "M"));true falseWhat it prints (run when this page was built)