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

Function isNumeric

javascript/selenium-webdriver/project_bidi_schema.mjs:904–910  ·  view source on GitHub ↗
(node, seen = new Set())

Source from the content-addressed store, hash-verified

902 ? node.union.some(hasEmptyInlineRecord)
903 : false
904 const isNumeric = (node, seen = new Set()) => {
905 if (node.primitive !== undefined) return node.primitive === 'integer' || node.primitive === 'number'
906 if (node.ref === undefined || seen.has(node.ref)) return false
907 seen.add(node.ref)
908 const target = allTypes[node.ref]
909 return target?.kind === 'alias' && isNumeric(target.type, seen)
910 }
911 const nestedTypes = (node) => [node.list, node.map, ...(node.union ?? []), ...(node.record ?? []).map((f) => f.type)]
912 const hasMisplacedBound = (node) =>
913 !!node && ((BOUND_KEYS.some((k) => k in node) && !isNumeric(node)) || nestedTypes(node).some(hasMisplacedBound))

Callers 1

hasMisplacedBoundFunction · 0.85

Calls 2

addMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected