@aws-sdk/hash-blob-browser
Advanced tools
Comparing version 3.178.0 to 3.183.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03) | ||
**Note:** Version bump only for package @aws-sdk/hash-blob-browser | ||
# [3.178.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.177.0...v3.178.0) (2022-09-23) | ||
@@ -8,0 +16,0 @@ |
@@ -1,19 +0,8 @@ | ||
import { __awaiter, __generator } from "tslib"; | ||
import { blobReader } from "@aws-sdk/chunked-blob-reader"; | ||
export var blobHasher = function blobHasher(hashCtor, blob) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var hash; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
hash = new hashCtor(); | ||
return [4, blobReader(blob, function (chunk) { | ||
hash.update(chunk); | ||
})]; | ||
case 1: | ||
_a.sent(); | ||
return [2, hash.digest()]; | ||
} | ||
}); | ||
export const blobHasher = async function blobHasher(hashCtor, blob) { | ||
const hash = new hashCtor(); | ||
await blobReader(blob, (chunk) => { | ||
hash.update(chunk); | ||
}); | ||
return hash.digest(); | ||
}; |
{ | ||
"name": "@aws-sdk/hash-blob-browser", | ||
"version": "3.178.0", | ||
"version": "3.183.0", | ||
"scripts": { | ||
@@ -23,5 +23,5 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/chunked-blob-reader": "3.170.0", | ||
"@aws-sdk/chunked-blob-reader-native": "3.170.0", | ||
"@aws-sdk/types": "3.178.0", | ||
"@aws-sdk/chunked-blob-reader": "3.183.0", | ||
"@aws-sdk/chunked-blob-reader-native": "3.183.0", | ||
"@aws-sdk/types": "3.183.0", | ||
"tslib": "^2.3.1" | ||
@@ -31,3 +31,3 @@ }, | ||
"@aws-crypto/sha256-js": "2.0.0", | ||
"@aws-sdk/util-hex-encoding": "3.170.0", | ||
"@aws-sdk/util-hex-encoding": "3.183.0", | ||
"@tsconfig/recommended": "1.0.1", | ||
@@ -34,0 +34,0 @@ "concurrently": "7.0.0", |
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
56520
24
+ Added@aws-sdk/chunked-blob-reader@3.183.0(transitive)
+ Added@aws-sdk/chunked-blob-reader-native@3.183.0(transitive)
+ Added@aws-sdk/types@3.183.0(transitive)
+ Added@aws-sdk/util-base64-browser@3.183.0(transitive)
- Removed@aws-sdk/chunked-blob-reader@3.170.0(transitive)
- Removed@aws-sdk/chunked-blob-reader-native@3.170.0(transitive)
- Removed@aws-sdk/types@3.178.0(transitive)
- Removed@aws-sdk/util-base64-browser@3.170.0(transitive)
Updated@aws-sdk/types@3.183.0