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

Function buildSpecHrefs

javascript/selenium-webdriver/project_bidi_schema.mjs:504–512  ·  view source on GitHub ↗
(dfnsDocs)

Source from the content-addressed store, hash-verified

502 * @returns {Object<string,string>} Map from schema type name to its spec-definition URL.
503 */
504export function buildSpecHrefs(dfnsDocs) {
505 const hrefs = {}
506 for (const doc of dfnsDocs ?? [])
507 for (const dfn of doc?.dfns ?? []) {
508 const name = dfn.type === 'cddl-type' ? dfn.linkingText?.[0] : undefined
509 if (name && dfn.href && !(name in hrefs)) hrefs[name] = dfn.href
510 }
511 return hrefs
512}
513
514/**
515 * Compose the spec-link maps the projector attaches, from the webref CDDL indexes

Callers 2

buildSpecLinksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected