release: Multi-Hoster-Upload v2.0.3

This commit is contained in:
Sucukdeluxe
2026-08-09 14:54:44 +02:00
parent 6cdccf71f2
commit 1c4d096cb9
31 changed files with 2304 additions and 131 deletions
+22
View File
@@ -0,0 +1,22 @@
(function (root) {
'use strict';
function createSerializedRunner(task) {
if (typeof task !== 'function') throw new TypeError('task must be a function');
let pending = Promise.resolve();
return {
run(...args) {
const result = pending.catch(() => {}).then(() => task(...args));
pending = result;
return result;
},
flush() {
return pending;
}
};
}
const api = { createSerializedRunner };
if (typeof module !== 'undefined' && module.exports) module.exports = api;
else if (root) root.SerializedRunner = api;
})(typeof window !== 'undefined' ? window : this);