MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / decodeValue

Function decodeValue

packages/frontend/src/decode.ts:215–233  ·  view source on GitHub ↗
(
    list: EncodedValue[],
    prevValue: DecodedValue | null,
    storeRefMap: StoreNodeMap,
)

Source from the content-addressed store, hash-verified

213 * The previous value is important for removing store references that are no longer in the tree.
214 */
215export function decodeValue(
216 list: EncodedValue[],
217 prevValue: DecodedValue | null,
218 storeRefMap: StoreNodeMap,
219): DecodedValue {
220 StoreRefMap = storeRefMap
221 Seen = new Set()
222 List = list
223 DecodedMap = new Map()
224
225 prevValue && removeNestedStoreRefs(prevValue)
226
227 const decoded = decode(0)
228
229 // we don't want to keep globals around
230 List = DecodedMap = StoreRefMap = Seen = undefined!
231
232 return decoded
233}
234
235/**
236 * Collapse or extend the value of an object/array/store.

Callers

nothing calls this directly

Calls 2

removeNestedStoreRefsFunction · 0.85
decodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…