Get started with asynquence CDN
MIT licensed
Asynquence is a library for managing asynchronous workflows using a chainable, fluent interface.
Tags:- async
- flow-control
- generator
- iterator
- promise
- sequences
Stable version
Copied!
How to start using asynquence CDN
// Include Asynquence library from the CDN
const Asynquence = require('asq').import('asq');
// Create a sequence with three tasks
const sequence = Asynquence()
.delay(1000) // Delay for 1 second
.map(function(value) {
return value + 1;
})
.delay(1000) // Delay for 1 second
.map(function(value) {
return value * 2;
})
.map(function(value) {
console.log('Result:', value); // Log the result
return Asynquence.all([Asynquence.promise(function() {
return new Promise(function(resolve) {
setTimeout(function() {
resolve();
}, 2000); // Delay for 2 seconds
});
})]);
})
.then(function() {
console.log('Sequence completed.');
});
// Start the sequence
sequence.run();
Copied!
Copied!
All versions
0.1.0
0.1.1-a
0.10.0
0.10.1
*** 0.10.2
0.2.0-a
0.2.0-b
0.2.0-c
0.3.0-a
0.3.1-a
0.3.2-a
0.3.2-b
0.3.3-a
0.3.3-b
0.3.4-a
0.3.4-b
0.3.4-c
0.3.4-d
0.3.4-e
0.3.4-f
0.3.4-g
0.3.4-h
0.3.5-a
0.3.5-b
0.3.5-c
0.3.5-d
0.3.6-a
0.4.0-a
0.4.0-b
0.4.1-a
0.5.0-a
0.5.1-a
0.5.2-a
0.5.2-b
0.5.2-c
0.5.2-d
0.5.2-e
0.5.2-f
0.5.2-g
0.5.3-a
0.5.4-a
0.5.5-a
0.5.5-b
0.6.0-a
0.6.0-b
0.8.0
0.8.1
0.8.2
0.9.0