Socket
Socket
Sign inDemoInstall

p-limit

Package Overview
Dependencies
1
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.2.2

26

index.d.ts
export interface Limit {
/**
* @param fn - Promise-returning/async function.
* @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions.
* @returns The promise returned by calling `fn(...arguments)`.
*/
@param fn - Promise-returning/async function.
@param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions.
@returns The promise returned by calling `fn(...arguments)`.
*/
<Arguments extends unknown[], ReturnType>(

@@ -13,9 +13,9 @@ fn: (...arguments: Arguments) => PromiseLike<ReturnType> | ReturnType,

/**
* The number of promises that are currently running.
*/
The number of promises that are currently running.
*/
readonly activeCount: number;
/**
* The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
*/
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
*/
readonly pendingCount: number;

@@ -25,7 +25,7 @@ }

/**
* Run multiple promise-returning & async functions with limited concurrency.
*
* @param concurrency - Concurrency limit. Minimum: `1`.
* @returns A `limit` function.
*/
Run multiple promise-returning & async functions with limited concurrency.
@param concurrency - Concurrency limit. Minimum: `1`.
@returns A `limit` function.
*/
export default function pLimit(concurrency: number): Limit;
{
"name": "p-limit",
"version": "2.2.1",
"version": "2.2.2",
"description": "Run multiple promise-returning & async functions with limited concurrency",
"license": "MIT",
"repository": "sindresorhus/p-limit",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {

@@ -8,0 +9,0 @@ "name": "Sindre Sorhus",

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

## Install

@@ -13,3 +12,2 @@

## Usage

@@ -35,3 +33,2 @@

## API

@@ -45,4 +42,4 @@

Type: `number`<br>
Minimum: `1`<br>
Type: `number`\
Minimum: `1`\
Default: `Infinity`

@@ -76,3 +73,2 @@

## FAQ

@@ -82,5 +78,4 @@

This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue.
This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue.
## Related

@@ -94,3 +89,2 @@

---

@@ -97,0 +91,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc