Upgrade Ava to v4

This commit is contained in:
Henry Mercer 2022-02-01 18:01:11 +00:00
parent 9a40cc5274
commit ce89f1b611
1153 changed files with 27264 additions and 95308 deletions

30
node_modules/p-limit/readme.md generated vendored
View file

@ -1,19 +1,17 @@
# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)
# p-limit
> Run multiple promise-returning & async functions with limited concurrency
## Install
```
$ npm install p-limit
```
## Usage
```js
const pLimit = require('p-limit');
import pLimit from 'p-limit';
const limit = pLimit(1);
@ -23,14 +21,11 @@ const input = [
limit(() => doSomething())
];
(async () => {
// Only one promise is run at once
const result = await Promise.all(input);
console.log(result);
})();
// Only one promise is run at once
const result = await Promise.all(input);
console.log(result);
```
## API
### pLimit(concurrency)
@ -39,8 +34,8 @@ Returns a `limit` function.
#### concurrency
Type: `number`<br>
Minimum: `1`<br>
Type: `number`\
Minimum: `1`\
Default: `Infinity`
Concurrency limit.
@ -69,13 +64,19 @@ The number of promises that are currently running.
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
### 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
### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
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
@ -85,7 +86,6 @@ This package is only about limiting the number of concurrent executions, while `
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
- [More…](https://github.com/sindresorhus/promise-fun)
---
<div align="center">