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

Function unionSets

packages/db/src/utils/index-optimization.ts:95–103  ·  view source on GitHub ↗
(sets: Array<Set<T>>)

Source from the content-addressed store, hash-verified

93 * Unions multiple sets (OR logic)
94 */
95export function unionSets<T>(sets: Array<Set<T>>): Set<T> {
96 const result = new Set<T>()
97 for (const set of sets) {
98 for (const item of set) {
99 result.add(item)
100 }
101 }
102 return result
103}
104
105/**
106 * Whether a value can be matched exactly by an index lookup, i.e. the index

Callers 1

optimizeOrExpressionFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected