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

Function size

scripts/extract-release-notes.mjs:143–143  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

141
142function fitToReleaseBody(lines) {
143 const size = (line) => Buffer.byteLength(line, 'utf8') + 1;
144 if (lines.reduce((n, line) => n + size(line), 0) <= MAX_BODY_BYTES) return lines;
145 // Cut only where an entry or a heading starts, outside a code fence, so no
146 // entry is shown in part.

Callers 1

fitToReleaseBodyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected