Socket
Socket
Sign inDemoInstall

@aws-sdk/chunked-blob-reader

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/chunked-blob-reader - npm Package Compare versions

Comparing version 3.183.0 to 3.186.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
**Note:** Version bump only for package @aws-sdk/chunked-blob-reader
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)

@@ -8,0 +16,0 @@

15

dist-es/index.js

@@ -1,8 +0,9 @@

export function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
return new Promise((resolve, reject) => {
const fileReader = new FileReader();
export function blobReader(blob, onChunk, chunkSize) {
if (chunkSize === void 0) { chunkSize = 1024 * 1024; }
return new Promise(function (resolve, reject) {
var fileReader = new FileReader();
fileReader.addEventListener("error", reject);
fileReader.addEventListener("abort", reject);
const size = blob.size;
let totalBytesRead = 0;
var size = blob.size;
var totalBytesRead = 0;
function read() {

@@ -15,4 +16,4 @@ if (totalBytesRead >= size) {

}
fileReader.addEventListener("load", (event) => {
const result = event.target.result;
fileReader.addEventListener("load", function (event) {
var result = event.target.result;
onChunk(new Uint8Array(result));

@@ -19,0 +20,0 @@ totalBytesRead += result.byteLength;

{
"name": "@aws-sdk/chunked-blob-reader",
"version": "3.183.0",
"version": "3.186.0",
"scripts": {

@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc