Socket
Socket
Sign inDemoInstall

fetch-blob

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-blob - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

from.js

4

CHANGELOG.md
Changelog
=========
## v2.1.0
- Fix: .slice has an implementation bug (#54).
- Added blob backed up by filesystem (#55)
## v2.0.1

@@ -5,0 +9,0 @@

2

index.js

@@ -141,3 +141,3 @@ const {Readable} = require('stream');

blobParts.push(chunk);
added += size;
added += ArrayBuffer.isView(chunk) ? chunk.byteLength : chunk.size;
relativeStart = 0; // All next sequental parts should start at 0

@@ -144,0 +144,0 @@

{
"name": "fetch-blob",
"version": "2.0.1",
"version": "2.1.0",
"description": "A Blob implementation in Node.js, originally from node-fetch.",
"main": "index.js",
"files": [
"from.js",
"index.js",

@@ -51,3 +52,5 @@ "index.d.ts"

},
"dependencies": {}
"peerDependencies": {
"domexception": "^2.0.1"
}
}

@@ -30,2 +30,20 @@ # fetch-blob

### Blob part backed up by filesystem
To use, install [domexception](https://github.com/jsdom/domexception).
```sh
npm install fetch-blob domexception
```
```js
const blobFrom = require('fetch-blob/from.js');
const blob1 = blobFrom('./2-GiB-file.bin');
const blob2 = blobFrom('./2-GiB-file.bin');
// Not a 4 GiB memory snapshot, just holds 3 references
// points to where data is located on the disk
const blob = new Blob([blob1, blob2]);
console.log(blob.size) // 4 GiB
```
See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob) and [tests](https://github.com/node-fetch/fetch-blob/blob/master/test.js) for more details.

@@ -32,0 +50,0 @@

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