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

Method getStringId

packages/db-ivm/src/utils.ts:117–123  ·  view source on GitHub ↗

* Get a string representation of the ID for use in composite keys.

(value: any)

Source from the content-addressed store, hash-verified

115 * Get a string representation of the ID for use in composite keys.
116 */
117 getStringId(value: any): string {
118 if (value === null) return `null`
119 if (value === undefined) return `undefined`
120 if (typeof value !== `object`) return `str_${String(value)}`
121
122 return `obj_${this.getId(value)}`
123 }
124}
125
126/**

Callers 2

getTupleIdMethod · 0.80
#consolidateKeyedMethod · 0.80

Calls 1

getIdMethod · 0.95

Tested by

no test coverage detected