(dfnsDocs)
| 576 | * @returns {Object<string,string>} Map from schema type name to its spec-definition URL. |
| 577 | */ |
| 578 | export function buildSpecHrefs(dfnsDocs) { |
| 579 | const hrefs = {} |
| 580 | for (const doc of dfnsDocs ?? []) |
| 581 | for (const dfn of doc?.dfns ?? []) { |
| 582 | const name = dfn.type === 'cddl-type' ? dfn.linkingText?.[0] : undefined |
| 583 | if (name && dfn.href && !(name in hrefs)) hrefs[name] = dfn.href |
| 584 | } |
| 585 | return hrefs |
| 586 | } |
| 587 | |
| 588 | /** |
| 589 | * Compose the spec-link maps the projector attaches, from the webref CDDL indexes |
no outgoing calls
no test coverage detected