(src: string)
| 137 | } |
| 138 | |
| 139 | export function createHash(src: string): string { |
| 140 | // this doesn't need to be secure, the shorter the better. |
| 141 | const hash = crypto.createHash('sha1').update(src).digest('hex'); |
| 142 | return `sync-${hash}`; |
| 143 | } |
| 144 | |
| 145 | export function findLastIndex<T>(array: T[], finder: (element: T) => unknown): number { |
| 146 | for (let i = array.length - 1; i >= 0; --i) { |
no outgoing calls
no test coverage detected