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

Function forEachStoreProp

packages/debugger/src/inspector/store.ts:79–94  ·  view source on GitHub ↗
(
    node: Solid.StoreNode,
    fn: (key: string, node: Solid.StoreNode) => void,
)

Source from the content-addressed store, hash-verified

77}
78
79function forEachStoreProp(
80 node: Solid.StoreNode,
81 fn: (key: string, node: Solid.StoreNode) => void,
82): void {
83 if (Array.isArray(node)) {
84 for (let i = 0; i < node.length; i++) {
85 const child = node[i] as Solid.StoreNode
86 setup.store.isWrappable(child) && fn(i.toString(), child)
87 }
88 } else {
89 for (const key in node) {
90 const {value, get} = Object.getOwnPropertyDescriptor(node, key)!
91 if (!get && setup.store.isWrappable(value)) fn(key, value)
92 }
93 }
94}

Callers 2

trackStoreFunction · 0.85
untrackStoreFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…