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

Method filter

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

* Filter out records for which a function f(record) evaluates to False.

(f: (data: T) => boolean)

Source from the content-addressed store, hash-verified

43 * Filter out records for which a function f(record) evaluates to False.
44 */
45 filter(f: (data: T) => boolean): MultiSet<T> {
46 return new MultiSet(this.#inner.filter(([data, _]) => f(data)))
47 }
48
49 /**
50 * Negate all multiplicities in the collection.

Callers 15

assertLoadedExactlyFunction · 0.80
assertLoadedAtLeastFunction · 0.80
assertNotLoadedFunction · 0.80
assertAllItemsMatchFunction · 0.80
filterByFunction · 0.80
getExpectedCountsFunction · 0.80
applyCommittedTxMethod · 0.80
applyInMemoryWhereMethod · 0.80
toStableSerializableFunction · 0.80

Calls

no outgoing calls

Tested by 12

createOnDemandCollectionFunction · 0.64
apiDeleteFunction · 0.64
spawnProcessFunction · 0.64
stripVirtualOnlyUpdatesFunction · 0.64
testJoinTypeFunction · 0.64
createJoinSubqueryTestsFunction · 0.64
createDistinctTestsFunction · 0.64
createOrderByBugTestsFunction · 0.64
testJoinFunction · 0.64