(string, delimiter, hashFunction)
| 70 | * @returns {string} string with limited max length to 100 chars |
| 71 | */ |
| 72 | const shortenLongString = (string, delimiter, hashFunction) => { |
| 73 | if (string.length < 100) return string; |
| 74 | return ( |
| 75 | string.slice(0, 100 - 6 - delimiter.length) + |
| 76 | delimiter + |
| 77 | getHash(string, 6, hashFunction) |
| 78 | ); |
| 79 | }; |
| 80 | |
| 81 | /** |
| 82 | * Gets short module name. |
no test coverage detected