MCPcopy
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
17function replaceAt<T>(array: Array<T>, index: number, value: T): Array<T> {
18 const copy = array.slice(0)

Callers 1

setQueriesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…