allDifferentfunction
Whether a list names no card twice.
Import it
import { allDifferent } from "@johnmorrisdotca/toranpu";
Definition
function allDifferent(cards: readonly CardId[]): boolean
Parameters
| Name | Type | Description |
|---|---|---|
cards | readonly string[] | The cards in their current order. |
Returns
boolean
Whether a list names no card twice.
Examples
import { allDifferent } from "@johnmorrisdotca/toranpu";
console.log(allDifferent(["AS", "AS"]));falseWhat it prints (run when this page was built)