Collapse whitespace runs so multi-line clauses read as one signature.
(text: string, cap = 120)
| 54 | |
| 55 | /** Collapse whitespace runs so multi-line clauses read as one signature. */ |
| 56 | function collapse(text: string, cap = 120): string { |
| 57 | const flat = text.replace(/\s+/g, ' ').trim(); |
| 58 | return flat.length > cap ? flat.slice(0, cap - 1) + '…' : flat; |
| 59 | } |
| 60 | |
| 61 | function currentScope(ctx: ExtractorContext): string | undefined { |
| 62 | return ctx.nodeStack[ctx.nodeStack.length - 1]; |
no outgoing calls
no test coverage detected