mates関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether two facing collars mate: the same class, and both there.
インポート
import { mates } from "@johnmorrisdotca/uchusen-rockets";
定義
function mates(a: CollarClass | undefined, b: CollarClass | undefined): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
a | CollarClass | undefined | The collar on one module's end, or undefined for none. |
b | CollarClass | undefined | The collar on the module it meets. |
戻り値
boolean
True when both are there and of one class.
例
import { mates } from "@johnmorrisdotca/uchusen-rockets";
console.log(mates("L", "L"), mates("L", "M"));true false出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。