MCPcopy Create free account
hub / github.com/TanStack/query / difference

Function difference

packages/query-core/src/queriesObserver.ts:12–15  ·  view source on GitHub ↗
(array1: Array<T>, array2: Array<T>)

Source from the content-addressed store, hash-verified

10import type { QueryClient } from './queryClient'
11
12function difference<T>(array1: Array<T>, array2: Array<T>): Array<T> {
13 const excludeSet = new Set(array2)
14 return array1.filter((x) => !excludeSet.has(x))
15}
16
17type QueriesObserverListener = (result: Array<QueryObserverResult>) => void
18

Callers 1

setQueriesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected