(hash: string, maxLength?: number)
| 12 | * @protected |
| 13 | */ |
| 14 | export default function getHashString(hash: string, maxLength?: number): string { |
| 15 | if (maxLength === undefined) |
| 16 | maxLength = 22; |
| 17 | if (maxLength !== 0 && hash.length > maxLength) { |
| 18 | const first = hash.substring(0, Math.max(maxLength - 4, 0)); |
| 19 | const last = hash.substr(hash.length - 4); |
| 20 | return first + "..." + last; |
| 21 | } |
| 22 | else |
| 23 | return hash; |
| 24 | } |
no outgoing calls
no test coverage detected