MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / walk

Function walk

javascript/selenium-webdriver/normalize_bidi_ast.mjs:116–123  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

114function collectReferencedNames(ast) {
115 const referenced = new Set()
116 const walk = (v) => {
117 if (Array.isArray(v)) {
118 v.forEach(walk)
119 } else if (v && typeof v === 'object') {
120 if (v.Type === 'group' && typeof v.Value === 'string') referenced.add(v.Value)
121 for (const key in v) if (key !== 'Name') walk(v[key])
122 }
123 }
124 for (const def of ast) walk(def)
125 return referenced
126}

Callers 2

collectReferencedNamesFunction · 0.85
walkDirFunction · 0.85

Calls 2

addMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected