MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / blockHasContent

Function blockHasContent

scripts/prepare-release.mjs:144–149  ·  view source on GitHub ↗

* Return true when the block has any meaningful entries (a bullet line * starting with `-`, `*`, or a digit) — vs. being empty / just * whitespace / just sub-section headers with nothing under them.

(body)

Source from the content-addressed store, hash-verified

142 * whitespace / just sub-section headers with nothing under them.
143 */
144function blockHasContent(body) {
145 for (const line of body) {
146 if (/^\s*([-*]|\d+\.)\s+/.test(line)) return true;
147 }
148 return false;
149}
150
151/**
152 * Trim trailing blank lines from an array of lines, then return.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected