MCPcopy Create free account
hub / github.com/TanStack/db / negate

Method negate

packages/db-ivm/src/multiset.ts:52–56  ·  view source on GitHub ↗

* Negate all multiplicities in the collection.

()

Source from the content-addressed store, hash-verified

50 * Negate all multiplicities in the collection.
51 */
52 negate(): MultiSet<T> {
53 return new MultiSet(
54 this.#inner.map(([data, multiplicity]) => [data, -multiplicity]),
55 )
56 }
57
58 /**
59 * Concatenate two collections together.

Callers 1

innerMethod · 0.80

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected