lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
14 lines (10 loc) • 333 B
JavaScript
;
var chunkedBlobReader = require('@smithy/chunked-blob-reader');
const blobHasher = async function blobHasher(hashCtor, blob) {
const hash = new hashCtor();
await chunkedBlobReader.blobReader(blob, (chunk) => {
hash.update(chunk);
});
return hash.digest();
};
exports.blobHasher = blobHasher;