* Get the longest command term length. * * @param {Command} cmd * @param {Help} helper * @returns {number}
(cmd, helper)
| 204 | */ |
| 205 | |
| 206 | longestSubcommandTermLength(cmd, helper) { |
| 207 | return helper.visibleCommands(cmd).reduce((max, command) => { |
| 208 | return Math.max( |
| 209 | max, |
| 210 | this.displayWidth( |
| 211 | helper.styleSubcommandTerm(helper.subcommandTerm(command)), |
| 212 | ), |
| 213 | ); |
| 214 | }, 0); |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Get the longest option term length. |
no test coverage detected