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

Function withOperator

javascript/selenium-webdriver/project_bidi_schema.mjs:217–222  ·  view source on GitHub ↗
(node, operator)

Source from the content-addressed store, hash-verified

215// The parser hangs a control operator on a type entry, a field, or a definition. A numeric one
216// bounds the projected node; any other (`.default` …) does not change the type.
217function withOperator(node, operator) {
218 const bound = BOUND_OPERATORS[operator?.Type]
219 if (!bound) return node
220 const value = boundValue(operator.Value)
221 return value === undefined ? { primitive: 'unknown' } : narrow(node, bound, value)
222}
223
224function projectEntry(e) {
225 if (typeof e === 'string') return { primitive: PRIMITIVES[e] ?? e }

Callers 3

projectEntryFunction · 0.85
projectFieldFunction · 0.85
projectTypeFunction · 0.85

Calls 2

boundValueFunction · 0.85
narrowFunction · 0.85

Tested by

no test coverage detected