Skip to the content

Kumimoji組み文字

Build crosswords from seeded English or Japanese tile bags, alone or at a shared table.

Kumimoji means assembled characters in Japanese. About the name

Contents

Reference · Rules, tiles and records

sameLettersfunction

Whether two tallies hold the same letters, as many of each.

Import it

import { sameLetters } from "@johnmorrisdotca/kumimoji";

Definition

function sameLetters(a: Map<string, number>, b: Map<string, number>): boolean

Parameters

NameTypeDescription
aMap<string, number>

The first letter-count map.

bMap<string, number>

The second letter-count map.

Returns

boolean

Whether two tallies hold the same letters, as many of each.

Examples

import { lettersOf, sameLetters } from "@johnmorrisdotca/kumimoji";

console.log(sameLetters(lettersOf("cat"),lettersOf("act")));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kumimoji 1.6.0.