Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 3.1.5 to 3.2.0

10

from.js

@@ -68,5 +68,2 @@ import { statSync, createReadStream, promises as fs } from 'node:fs'

this.lastModified = options.lastModified
this.originalSize = options.originalSize === undefined
? options.size
: options.originalSize
}

@@ -82,3 +79,2 @@

lastModified: this.lastModified,
originalSize: this.originalSize,
size: end - start,

@@ -90,8 +86,6 @@ start: this.#start + start

async * stream () {
const { mtimeMs, size } = await stat(this.#path)
if (mtimeMs > this.lastModified || this.originalSize !== size) {
const { mtimeMs } = await stat(this.#path)
if (mtimeMs > this.lastModified) {
throw new DOMException('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.', 'NotReadableError')
}
yield * createReadStream(this.#path, {

@@ -98,0 +92,0 @@ start: this.#start,

8

index.js

@@ -86,8 +86,4 @@ /*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

const size = ArrayBuffer.isView(part) ? part.byteLength : part.size
// Avoid pushing empty parts into the array to better GC them
if (size) {
this.#size += size
this.#parts.push(part)
}
this.#size += ArrayBuffer.isView(part) ? part.byteLength : part.size
this.#parts.push(part)
}

@@ -94,0 +90,0 @@

{
"name": "fetch-blob",
"version": "3.1.5",
"version": "3.2.0",
"description": "Blob & File implementation in Node.js, originally from node-fetch.",

@@ -5,0 +5,0 @@ "main": "index.js",

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