Reference · Rules, tiles and records
lettersOffunction
How many of each letter.
Import it
import { lettersOf } from "@johnmorrisdotca/kumimoji";
Definition
function lettersOf(letters: Iterable<string>): Map<string, number>
Parameters
| Name | Type | Description |
|---|---|---|
letters | Iterable<string> | The iterable tile letters to count. |
Returns
Map<string, number>
How many of each letter.
Examples
import { lettersOf } from "@johnmorrisdotca/kumimoji";
console.log(lettersOf("cat"));Map(3) { 'c' => 1, 'a' => 1, 't' => 1 }What it prints (run when this page was built)