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

Function trimStructuralBlankLines

packages/tools/jsdocs/src/Jsdocs.ts:1002–1012  ·  view source on GitHub ↗
(lines: Array<string>)

Source from the content-addressed store, hash-verified

1000}
1001
1002function trimStructuralBlankLines(lines: Array<string>): Array<string> {
1003 let start = 0
1004 let end = lines.length
1005 if (lines[start]?.trim() === "") {
1006 start++
1007 }
1008 if (end > start && lines[end - 1]?.trim() === "") {
1009 end--
1010 }
1011 return lines.slice(start, end)
1012}
1013
1014function parseTags(lines: Array<string>): Array<JSDocTag> {
1015 const tags: Array<JSDocTag> = []

Callers 1

parseLooseJSDocBlockFunction · 0.85

Calls 2

trimMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected