MCPcopy Create free account
hub / github.com/Effect-TS/effect / displayApiId

Function displayApiId

packages/tools/api-diff/src/MigrationDoc.ts:24–31  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

22const stableApiId = (id: string): string => id.replace(/#(?:type|value)$/, "")
23
24const displayApiId = (id: string): string => {
25 const separator = id.indexOf("#")
26 if (separator === -1) {
27 return id
28 }
29 const module = id.slice(0, separator).split("/").at(-1)!
30 return `${module}.${id.slice(separator + 1)}`
31}
32
33const codeSpan = (value: string): string => {
34 const delimiter = "`".repeat(Math.max(1, ...(value.match(/`+/g)?.map((run) => run.length + 1) ?? [])))

Callers 2

renderDetailedEntryFunction · 0.85
renderCompactEntryFunction · 0.85

Calls 2

atMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected