Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sequential-task-queue

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequential-task-queue - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

dist/lib/sequential-task-queue.js

@@ -229,2 +229,2 @@ "use strict";

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlcXVlbnRpYWwtdGFzay1xdWV1ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBMkVBOzs7O0dBSUc7QUFDUSxnQ0FBd0IsR0FBRztJQUNsQyxtR0FBbUc7SUFDbkcsTUFBTSxFQUFFLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDO0lBQzNCLG9FQUFvRTtJQUNwRSxPQUFPLEVBQUUsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUM7Q0FDL0IsQ0FBQTtBQUVEOztHQUVHO0FBQ1EsaUNBQXlCLEdBQUc7SUFDbkMsT0FBTyxFQUFFLFNBQVM7SUFDbEIsS0FBSyxFQUFFLE9BQU87SUFDZCxPQUFPLEVBQUUsU0FBUztDQUNyQixDQUFBO0FBRUQ7O0dBRUc7QUFDSDtJQXFCSTs7O01BR0U7SUFDRixZQUFZLE9BQW9DO1FBbkJ4QyxVQUFLLEdBQWdCLEVBQUUsQ0FBQztRQUN4QixjQUFTLEdBQVksS0FBSyxDQUFDO1FBQzNCLFlBQU8sR0FBZSxFQUFFLENBQUM7UUFrQjdCLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDO1lBQ1QsT0FBTyxHQUFHLEVBQUUsQ0FBQztRQUNqQixJQUFJLENBQUMsY0FBYyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUM7UUFDdEMsSUFBSSxDQUFDLElBQUksR0FBRyxP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gICAgICAgICAgIGlmIChsaXN0KSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaSA9IDA7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoaSA8IGxpc3QubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3RbaV0gPT09IGhhbmRsZXIpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Quc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgaSsrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZW1pdChldnQ6IHN0cmluZywgLi4uYXJnczogYW55W10pIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudHMgJiYgdGhpcy5ldmVudHNbZXZ0XSlcclxuICAgICAgICAgICAgdHJ5IHsgXHJcbiAgICAgICAgICAgICAgICB0aGlzLmV2ZW50c1tldnRdLmZvckVhY2goZm4gPT4gZm4uYXBwbHkodGhpcywgYXJncykpO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGAke3RoaXMubmFtZX06IEV4Y2VwdGlvbiBpbiAnJHtldnR9JyBldmVudCBoYW5kbGVyYCwgZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIG5leHQoKSB7XHJcbiAgICAgICAgLy8gVHJ5IHJ1bm5pbmcgdGhlIG5leHQgdGFzaywgaWYgbm90IGN1cnJlbnRseSBydW5uaW5nIG9uZSBcclxuICAgICAgICBpZiAoIXRoaXMuY3VycmVudFRhc2spIHtcclxuICAgICAgICAgICAgdmFyIHRhc2sgPSB0aGlzLnF1ZXVlLnNoaWZ0KCk7XHJcbiAgICAgICAgICAgIC8vIHNraXAgY2FuY2VsbGVkIHRhc2tzXHJcbiAgICAgICAgICAgIHdoaWxlICh0YXNrICYmIHRhc2suY2FuY2VsbGF0aW9uVG9rZW4uY2FuY2VsbGVkKVxyXG4gICAgICAgICAgICAgICAgdGFzayA9IHRoaXMucXVldWUuc2hpZnQoKTtcclxuICAgICAgICAgICAgaWYgKHRhc2spIHtcclxuICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50VGFzayA9IHRhc2s7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhc2sudGltZW91dCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnRpbWVvdXRIYW5kbGUgPSBzZXRUaW1lb3V0KFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdChzZXF1ZW50aWFsVGFza1F1ZXVlRXZlbnRzLnRpbWVvdXQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2FuY2VsVGFzayh0YXNrLCBjYW5jZWxsYXRpb25Ub2tlblJlYXNvbnMudGltZW91dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2sudGltZW91dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXMgPSB0YXNrLmNhbGxiYWNrLmFwcGx5KHVuZGVmaW5lZCwgdGFzay5hcmdzKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzICYmIGlzUHJvbWlzZShyZXMpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcy50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbmVUYXNrKHRhc2spO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVyciA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb25lVGFzayh0YXNrLCBlcnIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZG9uZVRhc2sodGFzayk7XHJcblxyXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9uZVRhc2sodGFzaywgZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyBxdWV1ZSBpcyBlbXB0eSwgY2FsbCB3YWl0ZXJzXHJcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxXYWl0ZXJzKCk7IFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgY2FuY2VsVGFzayh0YXNrOiBUYXNrRW50cnksIHJlYXNvbj86IGFueSkge1xyXG4gICAgICAgIHRhc2suY2FuY2VsbGF0aW9uVG9rZW4uY2FuY2VsbGVkID0gdHJ1ZTtcclxuICAgICAgICB0YXNrLmNhbmNlbGxhdGlvblRva2VuLnJlYXNvbiA9IHJlYXNvbjtcclxuICAgICAgICB0aGlzLmRvbmVUYXNrKHRhc2spO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZG9uZVRhc2sodGFzazogVGFza0VudHJ5LCBlcnJvcj86IGFueSkge1xyXG4gICAgICAgIGlmICh0YXNrLnRpbWVvdXRIYW5kbGUpXHJcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0YXNrLnRpbWVvdXRIYW5kbGUpO1xyXG4gICAgICAgIHRhc2suY2FuY2VsbGF0aW9uVG9rZW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gICAgdGhyb3cgbmV3IEVycm9yKGAke3RoaXMubmFtZX0gaGFzIGJlZW4gcHJldmlvdXNseSBjbG9zZWRgKTtcclxuICAgICAgICB2YXIgdGFza0VudHJ5OiBUYXNrRW50cnkgPSB7XHJcbiAgICAgICAgICAgIGNhbGxiYWNrOiB0YXNrLFxyXG4gICAgICAgICAgICBhcmdzOiBvcHRpb25zICYmIG9wdGlvbnMuYXJncyA/IChBcnJheS5pc0FycmF5KG9wdGlvbnMuYXJncykgPyBvcHRpb25zLmFyZ3Muc2xpY2UoKSA6IFtvcHRpb25zLmFyZ3NdKSA6IFtdLFxyXG4gICAgICAgICAgICB0aW1lb3V0OiBvcHRpb25zICYmIG9wdGlvbnMudGltZW91dCAhPT0gdW5kZWZpbmVkID8gb3B0aW9ucy50aW1lb3V0IDogdGhpcy5kZWZhdWx0VGltZW91dCxcclxuICAgICAgICAgICAgY2FuY2VsbGF0aW9uVG9rZW46IHtcclxuICAgICAgICAgICAgICAgIGNhbmNlbDogKHJlYXNvbj8pID0+IHRoaXMuY2FuY2VsVGFzayh0YXNrRW50cnksIHJlYXNvbilcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICAgICAgdGFza0VudHJ5LmFyZ3MucHVzaCh0YXNrRW50cnkuY2FuY2VsbGF0aW9uVG9rZW4pO1xyXG4gICAgICAgIHRoaXMucXVldWUucHVzaCh0YXNrRW50cnkpO1xyXG4gICAgICAgIHRoaXMuc2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMubmV4dCgpKTtcclxuICAgICAgICByZXR1cm4gdGFza0VudHJ5LmNhbmNlbGxhdGlvblRva2VuO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2FuY2VscyB0aGUgY3VycmVudGx5IHJ1bm5pbmcgdGFzayAoaWYgYW55KSwgYW5kIGNsZWFycyB0aGUgcXVldWUuXHJcbiAgICAgKiBAcmV0dXJucyB7UHJvbWlzZX0gQSBQcm9taX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H07XHJcbiAgICAgICAgdGhpcy5vbihldnQsIGNiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJlbW92ZXMgYW4gZXZlbnQgaGFuZGxlci5cclxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldnQgLSBFdmVudCBuYW1lXHJcbiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBoYW5kbGVyIC0gRXZlbnQgaGFuZGxlciB0byBiZSByZW1vdmVkXHJcbiAgICAgKi9cclxuICAgIG9mZihldnQ6IHN0cmluZywgaGFuZGxlcjogRnVuY3Rpb24pIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudHMpIHtcclxuICAgICAgICAgICAgdmFyIGxpc3QgPSB0aGlzLmV2ZW50c1tldnRdO1xyXG4gICAgICAgICAgICBpZiAobGlzdCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGkgPSAwO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKGkgPCBsaXN0Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0W2ldID09PSBoYW5kbGVyKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0LnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGkrKztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGVtaXQoZXZ0OiBzdHJpbmcsIC4uLmFyZ3M6IGFueVtdKSB7XHJcbiAgICAgICAgaWYgKHRoaXMuZXZlbnRzICYmIHRoaXMuZXZlbnRzW2V2dF0pXHJcbiAgICAgICAgICAgIHRyeSB7IFxyXG4gICAgICAgICAgICAgICAgdGhpcy5ldmVudHNbZXZ0XS5mb3JFYWNoKGZuID0+IGZuLmFwcGx5KHRoaXMsIGFyZ3MpKTtcclxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihgJHt0aGlzLm5hbWV9OiBFeGNlcHRpb24gaW4gJyR7ZXZ0fScgZXZlbnQgaGFuZGxlcmAsIGUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBuZXh0KCkge1xyXG4gICAgICAgIC8vIFRyeSBydW5uaW5nIHRoZSBuZXh0IHRhc2ssIGlmIG5vdCBjdXJyZW50bHkgcnVubmluZyBvbmUgXHJcbiAgICAgICAgaWYgKCF0aGlzLmN1cnJlbnRUYXNrKSB7XHJcbiAgICAgICAgICAgIHZhciB0YXNrID0gdGhpcy5xdWV1ZS5zaGlmdCgpO1xyXG4gICAgICAgICAgICAvLyBza2lwIGNhbmNlbGxlZCB0YXNrc1xyXG4gICAgICAgICAgICB3aGlsZSAodGFzayAmJiB0YXNrLmNhbmNlbGxhdGlvblRva2VuLmNhbmNlbGxlZClcclxuICAgICAgICAgICAgICAgIHRhc2sgPSB0aGlzLnF1ZXVlLnNoaWZ0KCk7XHJcbiAgICAgICAgICAgIGlmICh0YXNrKSB7XHJcbiAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFRhc2sgPSB0YXNrO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0YXNrLnRpbWVvdXQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGFzay50aW1lb3V0SGFuZGxlID0gc2V0VGltZW91dChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoc2VxdWVudGlhbFRhc2tRdWV1ZUV2ZW50cy50aW1lb3V0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbFRhc2sodGFzaywgY2FuY2VsbGF0aW9uVG9rZW5SZWFzb25zLnRpbWVvdXQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrLnRpbWVvdXQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzID0gdGFzay5jYWxsYmFjay5hcHBseSh1bmRlZmluZWQsIHRhc2suYXJncyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcyAmJiBpc1Byb21pc2UocmVzKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb25lVGFzayh0YXNrKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnIgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZG9uZVRhc2sodGFzaywgZXJyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbmVUYXNrKHRhc2spO1xyXG5cclxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbmVUYXNrKHRhc2ssIGUpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gcXVldWUgaXMgZW1wdHksIGNhbGwgd2FpdGVyc1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsV2FpdGVycygpOyBcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGNhbmNlbFRhc2sodGFzazogVGFza0VudHJ5LCByZWFzb24/OiBhbnkpIHtcclxuICAgICAgICB0YXNrLmNhbmNlbGxhdGlvblRva2VuLmNhbmNlbGxlZCA9IHRydWU7XHJcbiAgICAgICAgdGFzay5jYW5jZWxsYXRpb25Ub2tlbi5yZWFzb24gPSByZWFzb247XHJcbiAgICAgICAgdGhpcy5kb25lVGFzayh0YXNrKTtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGRvbmVUYXNrKHRhc2s6IFRhc2tFbnRyeSwgZXJyb3I/OiBhbnkpIHtcclxuICAgICAgICBpZiAodGFzay50aW1lb3V0SGFuZGxlKVxyXG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGFzay50aW1lb3V0SGFuZGxlKTtcclxuICAgICAgICB0YXNrLmNhbmNlbGxhdGlvblRva2VuLmNhbmNlbCA9IG5vb3A7XHJcbiAgICAgICAgaWYgKGVycm9yKVxyXG4gICAgICAgICAgICB0aGlzLmVtaXQoc2VxdWVudGlhbFRhc2tRdWV1ZUV2ZW50cy5lcnJvciwgZXJyb3IpO1xyXG4gICAgICAgIGlmICh0aGlzLmN1cnJlbnRUYXNrID09PSB0YXNrKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFRhc2sgPSB1bmRlZmluZWQ7XHJcbiAgICAgICAgICAgIGlmICghdGhpcy5xdWV1ZS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZW1pdChzZXF1ZW50aWFsVGFza1F1ZXVlRXZlbnRzLmRyYWluZWQpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsV2FpdGVycygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIHRoaXMuc2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMubmV4dCgpKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBjYWxsV2FpdGVycygpIHtcclxuICAgICAgICBsZXQgd2FpdGVycyA9IHRoaXMud2FpdGVycy5zcGxpY2UoMCk7XHJcbiAgICAgICAgd2FpdGVycy5mb3JFYWNoKHdhaXRlciA9PiB3YWl0ZXIoKSk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmludGVyZmFjZSBUYXNrRW50cnkge1xyXG4gICAgYXJnczogYW55W107XHJcbiAgICBjYWxsYmFjazogRnVuY3Rpb247XHJcbiAgICB0aW1lb3V0PzogbnVtYmVyO1xyXG4gICAgdGltZW91dEhhbmRsZT86IGFueTtcclxuICAgIGNhbmNlbGxhdGlvblRva2VuOiBDYW5jZWxsYXRpb25Ub2tlbjtcclxufVxyXG5cclxuZnVuY3Rpb24gbm9vcCgpIHtcclxufVxyXG5cclxuZnVuY3Rpb24gaXNQcm9taXNlKG9iajogYW55KTogb2JqIGlzIFByb21pc2VMaWtlPGFueT4ge1xyXG4gICAgcmV0dXJuIChvYmogJiYgdHlwZW9mIG9iai50aGVuID09PSBcImZ1bmN0aW9uXCIpO1xyXG59XHJcblxyXG5TZXF1ZW50aWFsVGFza1F1ZXVlLmRlZmF1bHRTY2hlZHVsZXIgPSB7XHJcbiAgICBzY2hlZHVsZTogdHlwZW9mIHNldEltbWVkaWF0ZSA9PT0gXCJmdW5jdGlvblwiIFxyXG4gICAgICAgID8gY2FsbGJhY2sgPT4gc2V0SW1tZWRpYXRlKDwoLi4uYXJnczogYW55W10pID0+IHZvaWQ+Y2FsbGJhY2spXHJcbiAgICAgICAgOiBjYWxsYmFjayA9PiBzZXRUaW1lb3V0KDwoLi4uYXJnczogYW55W10pID0+IHZvaWQ+Y2FsbGJhY2ssIDApXHJcbn07XHJcblxyXG5cclxuXHJcblxyXG5cclxuXHJcblxyXG5cclxuXHJcblxyXG5cclxuXHJcblxyXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=

@@ -27,3 +27,3 @@ /**

/**
* Scheduler used by the queue.
* Scheduler used by the queue. Defaults to {@link SequentialTaskQueue.defaultScheduler}.
*/

@@ -30,0 +30,0 @@ scheduler?: Scheduler;

{
"name": "sequential-task-queue",
"version": "1.1.0",
"version": "1.1.1",
"description": "FIFO task queue for node and the browser",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc