MCPcopy
hub / github.com/marimo-team/marimo / equals

Function equals

frontend/src/utils/sets.ts:19–29  ·  view source on GitHub ↗

* Check if two sets are equal (contain the same elements).

(set1: Set<T>, set2: Set<T>)

Source from the content-addressed store, hash-verified

17 * Check if two sets are equal (contain the same elements).
18 */
19 equals<T>(set1: Set<T>, set2: Set<T>): boolean {
20 if (set1.size !== set2.size) {
21 return false;
22 }
23 for (const item of set1) {
24 if (!set2.has(item)) {
25 return false;
26 }
27 }
28 return true;
29 },
30
31 /**
32 * Return a new set with `item` toggled — removed if present, added if not.

Callers

nothing calls this directly

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…