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

Method update

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

* Update the value for a key using a function.

(key: K, updater: (value: V) => V)

Source from the content-addressed store, hash-verified

34 * Update the value for a key using a function.
35 */
36 update(key: K, updater: (value: V) => V): V {
37 const value = this.get(key)
38 const newValue = updater(value)
39 this.set(key, newValue)
40 return newValue
41 }
42}
43
44// JS engines have various limits on how many args can be passed to a function

Callers 15

#consolidateUnkeyedMethod · 0.95
query.test.tsFile · 0.45
rxdb.test.tsFile · 0.45
powersync.test.tsFile · 0.45

Calls 2

getMethod · 0.95
setMethod · 0.45

Tested by 4

getConfigFunction · 0.36