MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / calculateSemanticDepth

Function calculateSemanticDepth

server/utils/readme.ts:441–445  ·  view source on GitHub ↗
(depth: number, lastSemanticLevel: number)

Source from the content-addressed store, hash-verified

439// For deeper levels, ensure sequential order
440// Don't allow jumping more than 1 level deeper than previous
441export function calculateSemanticDepth(depth: number, lastSemanticLevel: number) {
442 if (depth === 1) return 3
443 const maxAllowed = Math.min(lastSemanticLevel + 1, 6)
444 return Math.min(depth + 2, maxAllowed)
445}
446
447/**
448 * Render YAML frontmatter as a GitHub-style key-value table.

Callers 2

changelogRendererFunction · 0.90
processHeadingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected