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

Function trimTrailingBlank

scripts/prepare-release.mjs:155–159  ·  view source on GitHub ↗

* Trim trailing blank lines from an array of lines, then return. * Keeps the output tidy when merging.

(arr)

Source from the content-addressed store, hash-verified

153 * Keeps the output tidy when merging.
154 */
155function trimTrailingBlank(arr) {
156 let i = arr.length;
157 while (i > 0 && /^\s*$/.test(arr[i - 1])) i--;
158 return arr.slice(0, i);
159}
160
161function main() {
162 const versionArg = process.argv[2];

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected