(
node: Solid.StoreNode,
fn: (key: string, node: Solid.StoreNode) => void,
)
| 77 | } |
| 78 | |
| 79 | function 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 | } |
no test coverage detected
searching dependent graphs…