* Trim trailing blank lines from an array of lines, then return. * Keeps the output tidy when merging.
(arr)
| 153 | * Keeps the output tidy when merging. |
| 154 | */ |
| 155 | function 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 | |
| 161 | function main() { |
| 162 | const versionArg = process.argv[2]; |