(input: string, maxLength: number)
| 25 | * Clip the input string to the maximum length, using ellipses if it is too long. |
| 26 | */ |
| 27 | export const clipToMaximum = (input: string, maxLength: number): string => |
| 28 | input.length > maxLength |
| 29 | ? `${input.slice(0, maxLength - 3)}...` |
| 30 | : input |
| 31 | |
| 32 | /** |
| 33 | * Returns a string with any non-word characters (anything but letters, numbers or the underscore) |
no outgoing calls
no test coverage detected