Function
withPrefixText
(
prefixText: string | undefined,
symbolFormatter: Formatter | undefined,
)
Source from the content-addressed store, hash-verified
| 27 | } |
| 28 | |
| 29 | const withPrefixText = ( |
| 30 | prefixText: string | undefined, |
| 31 | symbolFormatter: Formatter | undefined, |
| 32 | ) => { |
| 33 | if (typeof prefixText === 'undefined') { |
| 34 | return symbolFormatter; |
| 35 | } |
| 36 | |
| 37 | return (symbol: string) => |
| 38 | `${prefixText}${symbolFormatter?.(symbol) ?? symbol}`; |
| 39 | }; |
| 40 | |
| 41 | const normalizeDisplay = (display: SpinnerDisplay): DisplayOptions | string => { |
| 42 | if (typeof display === 'string') { |
Tested by
no test coverage detected