squadron
Synchronize, throttle and debounce promises
Installation
npm install squadron
Synchronizer
The Synchronizer can be used to synchronize any set of promises. It can be very useful when you need to ensure sequential ordering. It can also be used to implement a mutex around a resource as it ensures that only one promise can access the resource concurrently.
var squadron = sporks = ; var { console; return sporks;}; var synchronizer = ; synchronizer; synchronizer;
The output is then
begin promise 1
end promise 1
begin promise 2
end promise 2