@cumulus/checksum
Advanced tools
Comparing version 9.0.1 to 9.1.0
@@ -27,3 +27,3 @@ "use strict"; | ||
async function getCksumFromStream(stream) { | ||
return new Promise((resolve, reject) => stream | ||
return await new Promise((resolve, reject) => stream | ||
.pipe(cksum.stream((value) => resolve(value.readUInt32BE(0)))) | ||
@@ -34,3 +34,3 @@ .on('error', reject)); | ||
async function getChecksumFromStream(algorithm, stream, options = {}) { | ||
return new Promise((resolve, reject) => { | ||
return await new Promise((resolve, reject) => { | ||
const hash = crypto.createHash(algorithm, options); | ||
@@ -53,9 +53,9 @@ stream.on('error', reject); | ||
*/ | ||
function generateChecksumFromStream(algorithm, stream, options) { | ||
async function generateChecksumFromStream(algorithm, stream, options) { | ||
if (algorithm.toLowerCase() === 'cksum') { | ||
return getCksumFromStream(stream); | ||
return await getCksumFromStream(stream); | ||
} | ||
return getChecksumFromStream(algorithm, stream, options); | ||
return await getChecksumFromStream(algorithm, stream, options); | ||
} | ||
exports.generateChecksumFromStream = generateChecksumFromStream; | ||
//# sourceMappingURL=checksum.js.map |
{ | ||
"name": "@cumulus/checksum", | ||
"version": "9.0.1", | ||
"version": "9.1.0", | ||
"description": "Cumulus checksum utilities", | ||
@@ -42,3 +42,3 @@ "engines": { | ||
}, | ||
"gitHead": "b70d75b84735339d859e435e54bc3110e3081ab8" | ||
"gitHead": "75b4d538b3ef808b30c5c7b1cf71a3619ab9086c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18978