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

suprqueue

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suprqueue - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

13

dist/Suprqueue.js

@@ -62,9 +62,11 @@ "use strict";

cancelTasks(key) {
const isCanceledItem = (item) => item.key === key;
const canceledItems = this._queue.filter((item) => isCanceledItem(item));
this._queue = this._queue.filter((item) => !isCanceledItem(item));
if (this._currentTask && isCanceledItem(this._currentTask)) {
const shouldCancelItem = (item) => item.key === key;
const itemsToCancel = this._queue.filter((item) => shouldCancelItem(item));
this._queue = this._queue.filter((item) => !shouldCancelItem(item));
const canceledItems = [];
if (this._currentTask && shouldCancelItem(this._currentTask)) {
canceledItems.push(this._currentTask);
this._currentTaskAbortController?.abort();
}
canceledItems.forEach((item) => {
itemsToCancel.forEach((item) => {
let abortController;

@@ -77,2 +79,3 @@ try {

}
canceledItems.push(item);
abortController?.abort();

@@ -79,0 +82,0 @@ try {

{
"name": "suprqueue",
"version": "1.6.0",
"version": "1.6.1",
"description": "Simple in-memory promise-based task queue with support for pausing, merging tasks, or retrying failed tasks",

@@ -5,0 +5,0 @@ "main": "dist/Suprqueue.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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