()
| 39 | } |
| 40 | |
| 41 | const cmdNames = () => { |
| 42 | const out = [''] |
| 43 | |
| 44 | const line = !process.stdout.columns ? COL_MAX |
| 45 | : Math.min(COL_MAX, Math.max(process.stdout.columns - COL_GUTTER, COL_MIN)) |
| 46 | |
| 47 | let l = 0 |
| 48 | for (const c of commands) { |
| 49 | if (out[l].length + c.length + 2 < line) { |
| 50 | out[l] += ', ' + c |
| 51 | } else { |
| 52 | out[l++] += ',' |
| 53 | out[l] = c |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | return indentNewline() + out.join(indentNewline()).slice(2) |
| 58 | } |
| 59 | |
| 60 | const cmdUsages = (Npm) => { |
| 61 | // return a string of <command>: <usage> |
no test coverage detected
searching dependent graphs…