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

Function findOwner

packages/debugger/src/main/utils.ts:202–212  ·  view source on GitHub ↗
(
    root: Solid.Owner,
    predicate: (owner: Solid.Owner) => boolean,
)

Source from the content-addressed store, hash-verified

200 * helper to getting to an owner that you want — walking downwards
201 */
202export function findOwner(
203 root: Solid.Owner,
204 predicate: (owner: Solid.Owner) => boolean,
205): Solid.Owner | null {
206 const queue: Solid.Owner[] = [root]
207 for (const owner of queue) {
208 if (predicate(owner)) return owner
209 if (Array.isArray(owner.owned)) queue.push(...owner.owned)
210 }
211 return null
212}
213
214export function lookupOwner(
215 owner: Solid.Owner,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…