(dir: string)
| 23 | }; |
| 24 | |
| 25 | const getHash = async (dir: string): Promise<string> => { |
| 26 | const files = await getAllFiles(dir); |
| 27 | const hasher = await createXXHash64(); |
| 28 | hasher.init(); |
| 29 | for (const file of files) { |
| 30 | const contents = await fs.readFile(file); |
| 31 | hasher.update(contents); |
| 32 | } |
| 33 | return hasher.digest(); |
| 34 | }; |
| 35 | |
| 36 | export { getAllFiles, getHash }; |
no test coverage detected