1.1.14 • Published 8 months ago
puqeue v1.1.14
puqeue
Introduction
A small JS library for queuing promises.
Use
const Puqeue = require('puqeue');
const queue = new Puqeue();
await queue.add(async () {
// My todo
});You can await multiple promises in a queue by using Promise.all.
await Promise.all(
queue.add(async () {
console.info(1);
}),
queue.add(async () {
console.info(3);
}, { priority: 100 }),
queue.add(async () {
console.info(2);
})
);The above example will execute one at the time, but second operation will execute last due to priority.
Default priority is
10.
Options
You specify the maximum number of concurrent promises run with an option.
new Puqeue({ maxOperationCount: 2 });Use
0to indicate no limit (default is1).
LICENSE
See LICENSE.
1.1.9
11 months ago
1.1.12
9 months ago
1.1.11
10 months ago
1.1.10
11 months ago
1.1.14
8 months ago
1.1.13
9 months ago
1.1.8
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.0.19
2 years ago
1.1.0
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago