MCPcopy Index your code
hub / github.com/TanStack/db / getObjectId

Function getObjectId

packages/db/src/utils/comparison.ts:11–18  ·  view source on GitHub ↗

* Get or create a stable ID for an object

(obj: object)

Source from the content-addressed store, hash-verified

9 * Get or create a stable ID for an object
10 */
11function getObjectId(obj: object): number {
12 if (objectIds.has(obj)) {
13 return objectIds.get(obj)!
14 }
15 const id = nextObjectId++
16 objectIds.set(obj, id)
17 return id
18}
19
20/**
21 * Whether a value has no IEEE-754 natural order: `NaN`, or an invalid Date

Callers 1

ascComparatorFunction · 0.85

Calls 3

hasMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…