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

@whatwg-node/node-fetch

Package Overview
Dependencies
Maintainers
1
Versions
554
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/node-fetch - npm Package Compare versions

Comparing version 0.0.1-alpha-20221225160313-0935cfd to 0.0.1-alpha-20221225172458-8684a84

28

index.js

@@ -57,5 +57,7 @@ 'use strict';

function createController(desiredSize, readable) {
let enqueued = false;
return {
desiredSize,
enqueue(chunk) {
enqueued = true;
readable.push(chunk);

@@ -69,2 +71,5 @@ },

},
get enqueued() {
return enqueued;
}
};

@@ -106,10 +111,23 @@ }

else {
let waitingForPull = false;
this.readable = new stream.Readable({
read(desiredSize) {
async read(desiredSize) {
var _a, _b;
if (!started) {
started = true;
(_a = underlyingSource === null || underlyingSource === void 0 ? void 0 : underlyingSource.start) === null || _a === void 0 ? void 0 : _a.call(underlyingSource, createController(desiredSize, this));
if (waitingForPull) {
return;
}
(_b = underlyingSource === null || underlyingSource === void 0 ? void 0 : underlyingSource.pull) === null || _b === void 0 ? void 0 : _b.call(underlyingSource, createController(desiredSize, this));
waitingForPull = true;
try {
const controller = createController(desiredSize, this);
if (!started) {
started = true;
await ((_a = underlyingSource === null || underlyingSource === void 0 ? void 0 : underlyingSource.start) === null || _a === void 0 ? void 0 : _a.call(underlyingSource, controller));
}
if (!controller.enqueued) {
await ((_b = underlyingSource === null || underlyingSource === void 0 ? void 0 : underlyingSource.pull) === null || _b === void 0 ? void 0 : _b.call(underlyingSource, controller));
}
}
finally {
waitingForPull = false;
}
},

@@ -116,0 +134,0 @@ async destroy(err, callback) {

2

package.json
{
"name": "@whatwg-node/node-fetch",
"version": "0.0.1-alpha-20221225160313-0935cfd",
"version": "0.0.1-alpha-20221225172458-8684a84",
"description": "Fetch API implementation for Node",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

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