Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm
Package summary
Share
0
issues
1
license
3
MIT
Package created
28 Oct 2016
Version published
2 Sep 2023
Maintainers
2
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
eventemitter3@5.0.1
p-queue@7.4.1
p-timeout@5.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of p-queue 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
eventemitter35.0.111.81 kBMIT
prod
p-timeout5.1.03.55 kBMIT
prod

Visualizations

Frequently Asked Questions

What does p-queue do?

P-Queue is a popular NPM package that serves as a promise queue with concurrency control. It's predominantly beneficial for rate-limiting async (or synchronous) operations, such as when interacting with a REST API or undertaking CPU/memory intensive tasks. If you're running a server, you might want to consider a Redis-backed job queue instead.

How do you use p-queue?

To use P-Queue, you first need to install it using npm with the command npm install p-queue. Here's a basic coding example demonstrating how P-Queue is typically used:

import PQueue from 'p-queue';
import got from 'got';

const queue = new PQueue({concurrency: 1});

(async () => {
	await queue.add(() => got('https://sindresorhus.com'));
	console.log('Done: sindresorhus.com');
})();

(async () => {
	await queue.add(() => got('https://avajs.dev'));
	console.log('Done: avajs.dev');
})();

(async () => {
	const task = await getUnicornTask();
	await queue.add(task);
	console.log('Done: Unicorn task');
})();

In this example, only one promise is run at a time. If you want to run more than one promise concurrently, you would just increase the concurrency level when you initialize a new P-Queue.

Where are the p-queue docs?

When it comes to documentation, the most comprehensive resource for understanding and using P-Queue is located right in the README file on the package's GitHub repo at https://github.com/sindresorhus/p-queue. Here, you'll find detailed installation instructions, a succinct explanation of what the package does, usage instructions, an extensive API reference, event details, advanced examples, FAQs, related packages, and a list of maintainers. So, if you're looking to get up-to-speed on P-Queue fast, the GitHub repo is the best place to start.