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

streamiterator

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamiterator - npm Package Compare versions

Comparing version 1.0.17 to 1.1.0

33

distr/streamiterator.js

@@ -73,2 +73,14 @@ "use strict";

function afterCurrentResolvers(callback) {
if (resolvers.length === 0) {
callback();
} else {
var last = resolvers.pop();
resolvers.push(function (value) {
last(value);
callback();
});
}
}
stream //

@@ -84,18 +96,17 @@ .on("data", onData).on("error", onError).on("end", onEnd).pause();

});
}), _defineProperty(_result, "throw", function _throw(error) {
return new Promise(function (resolve) {
afterCurrentResolvers(function () {
stream.emit("error", error);
});
resolvers.push(resolve);
copyResults();
});
}), _defineProperty(_result, "return", function _return(value) {
return new Promise(function (resolve) {
if (resolvers.length === 0) {
finish();
} else {
var last = resolvers.pop();
resolvers.push(function (value) {
last(value);
finish();
});
}
function finish() {
afterCurrentResolvers(function () {
outputClosed = true;
resolve({ value: value, done: true });
close();
}
});
});

@@ -102,0 +113,0 @@ }), _result);

{
"name": "streamiterator",
"version": "1.0.17",
"version": "1.1.0",
"description": "converts ReadableStream into AsyncIterator",

@@ -5,0 +5,0 @@ "main": "distr/streamiterator.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