Skip to main content
Version: v0.0.5

Function: sameCodeSet()

sameCodeSet(a, b): boolean

Exact multiset (order-independent) equality of two code lists - the intended-warning comparison.

Parameters

a

readonly string[]

The first code list.

b

readonly string[]

The second code list.

Returns

boolean

true iff the two lists contain the same codes with the same multiplicities.

Example

import { sameCodeSet } from "@cosyte/synth";
sameCodeSet(["A", "B"], ["B", "A"]); // true