Socket
Socket
Sign inDemoInstall

p-limit

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-limit - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

9

index.d.ts

@@ -21,2 +21,11 @@ export interface Limit {

readonly pendingCount: number;
/**
Discard pending promises that are waiting to run.
This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
Note: This does not cancel promises that are already running.
*/
clearQueue(): void;
}

@@ -23,0 +32,0 @@

@@ -45,2 +45,7 @@ 'use strict';

get: () => queue.length
},
clearQueue: {
value: () => {
queue.length = 0;
}
}

@@ -47,0 +52,0 @@ });

2

package.json
{
"name": "p-limit",
"version": "2.2.2",
"version": "2.3.0",
"description": "Run multiple promise-returning & async functions with limited concurrency",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -69,2 +69,10 @@ # p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)

### limit.clearQueue()
Discard pending promises that are waiting to run.
This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
Note: This does not cancel promises that are already running.
## FAQ

@@ -71,0 +79,0 @@

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