(dfnsDocs)
| 502 | * @returns {Object<string,string>} Map from schema type name to its spec-definition URL. |
| 503 | */ |
| 504 | export 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 |
no outgoing calls
no test coverage detected