New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@async-generators/terminator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@async-generators/terminator - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

8

dist/commonjs/index.js

@@ -8,4 +8,6 @@ "use strict";

const it = source[Symbol.asyncIterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
it.next(Symbol.for("terminated"));
return $return.call(it);
};

@@ -20,4 +22,6 @@ return it;

const it = source[Symbol.iterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
it.next(Symbol.for("terminated"));
return $return.call(it);
};

@@ -24,0 +28,0 @@ return it;

@@ -6,4 +6,6 @@ export default function (source) {

const it = source[Symbol.asyncIterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
it.next(Symbol.for("terminated"));
return $return.call(it);
};

@@ -18,4 +20,6 @@ return it;

const it = source[Symbol.iterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
it.next(Symbol.for("terminated"));
return $return.call(it);
};

@@ -22,0 +26,0 @@ return it;

{
"name": "@async-generators/terminator",
"description": "inform an iterator when it is prematurely terminated by the consumer.",
"version": "0.1.1",
"version": "0.2.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Meirion Hughes",

@@ -11,5 +11,7 @@ export default function <T>(source: Iterable<T>): Iterable<T>;

const it = source[Symbol.asyncIterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
}
it.next(Symbol.for("terminated"));
return $return.call(it)
};
return it;

@@ -22,5 +24,7 @@ }

const it = source[Symbol.iterator]();
const $return = it.return;
it.return = function (value) {
return it.next(Symbol.for("terminated"));
}
it.next(Symbol.for("terminated"));
return $return.call(it);
};
return it;

@@ -27,0 +31,0 @@ }

Sorry, the diff of this file is not supported yet

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