UNPKG

lambda-live-debugger

Version:

Debug Lambda functions locally like it is running in the cloud

9 lines (8 loc) 281 B
import { blobReader } from "../chunked-blob-reader/chunked-blob-reader"; export const blobHasher = async function blobHasher(hashCtor, blob) { const hash = new hashCtor(); await blobReader(blob, (chunk) => { hash.update(chunk); }); return hash.digest(); };