mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 11:31:45 -04:00
11 lines
301 B
TypeScript
11 lines
301 B
TypeScript
import dirsum = require('@zkochan/dirsum')
|
|
|
|
export default function (dirpath: string): Promise<string> {
|
|
return new Promise((resolve, reject) => {
|
|
dirsum.digest(dirpath, 'sha1', (err: Error, hashes: {hash: string}) => {
|
|
if (err) return reject(err)
|
|
resolve(hashes.hash)
|
|
})
|
|
})
|
|
}
|