(single: Param.Single<Param.ParamKind, unknown>)
| 203 | const renderParamMessage = (single: Param.Single<Param.ParamKind, unknown>): string => renderParamLabel(single) |
| 204 | |
| 205 | const renderParamLabel = (single: Param.Single<Param.ParamKind, unknown>): string => { |
| 206 | const description = Option.getOrUndefined(single.description)?.trim() |
| 207 | const label = single.kind === Param.flagKind && description !== undefined && description.length <= 32 |
| 208 | ? description |
| 209 | : humanize(single.name) |
| 210 | return single.kind === Param.flagKind ? `${label} (${formatName(single)})` : label |
| 211 | } |
| 212 | |
| 213 | const humanize = (name: string): string => { |
| 214 | const words = name.split(/[-_]+/).filter((word) => word.length > 0) |
no test coverage detected