* Get the longest option term length. * * @param {Command} cmd * @param {Help} helper * @returns {number}
(cmd, helper)
| 223 | */ |
| 224 | |
| 225 | longestOptionTermLength(cmd, helper) { |
| 226 | return helper.visibleOptions(cmd).reduce((max, option) => { |
| 227 | return Math.max( |
| 228 | max, |
| 229 | this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))), |
| 230 | ); |
| 231 | }, 0); |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Get the longest global option term length. |
no test coverage detected