@atlaspack/utils 2.12.1-dev.3502 → 2.12.1-dev.3565
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +10 -4
- package/lib/index.js.map +1 -1
- package/package.json +7 -7
- package/src/PromiseQueue.js +3 -3
- package/src/collection.js +34 -0
- package/src/index.js +1 -0
- package/test/PromiseQueue.test.js +18 -18
- package/test/collection.test.js +11 -0
package/lib/index.js
CHANGED
|
@@ -34,7 +34,7 @@ function $parcel$interopDefault(a) {
|
|
|
34
34
|
var $parcel$modules = {};
|
|
35
35
|
var $parcel$inits = {};
|
|
36
36
|
|
|
37
|
-
var parcelRequire = $parcel$global["
|
|
37
|
+
var parcelRequire = $parcel$global["parcelRequired8fd"];
|
|
38
38
|
|
|
39
39
|
if (parcelRequire == null) {
|
|
40
40
|
parcelRequire = function(id) {
|
|
@@ -58,7 +58,7 @@ if (parcelRequire == null) {
|
|
|
58
58
|
$parcel$inits[id] = init;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
$parcel$global["
|
|
61
|
+
$parcel$global["parcelRequired8fd"] = parcelRequire;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
var parcelRegister = parcelRequire.register;
|
|
@@ -3443,6 +3443,7 @@ $parcel$export(module.exports, "unique", () => $11e7b1ac52642a5f$export$7a5d5c15
|
|
|
3443
3443
|
$parcel$export(module.exports, "objectSortedEntries", () => $11e7b1ac52642a5f$export$61559eb31990eff6);
|
|
3444
3444
|
$parcel$export(module.exports, "objectSortedEntriesDeep", () => $11e7b1ac52642a5f$export$1a9b883158ac407c);
|
|
3445
3445
|
$parcel$export(module.exports, "setDifference", () => $11e7b1ac52642a5f$export$8bd517cc5b3722f7);
|
|
3446
|
+
$parcel$export(module.exports, "setSymmetricDifference", () => $11e7b1ac52642a5f$export$be646fbd7a3fda37);
|
|
3446
3447
|
$parcel$export(module.exports, "setEqual", () => $11e7b1ac52642a5f$export$dd7d5a65a6b6780f);
|
|
3447
3448
|
$parcel$export(module.exports, "setIntersect", () => $11e7b1ac52642a5f$export$9404cfefeb010e68);
|
|
3448
3449
|
$parcel$export(module.exports, "setUnion", () => $11e7b1ac52642a5f$export$667066422fa0af46);
|
|
@@ -33970,7 +33971,7 @@ class $0bcbb32f9919749d$export$2e2bcd8739ae039 {
|
|
|
33970
33971
|
return this._queue.length;
|
|
33971
33972
|
}
|
|
33972
33973
|
add(fn) {
|
|
33973
|
-
|
|
33974
|
+
new Promise((resolve, reject)=>{
|
|
33974
33975
|
let i = this._count++;
|
|
33975
33976
|
this._queue.push(()=>fn().then((result)=>{
|
|
33976
33977
|
this._results[i] = result;
|
|
@@ -33981,7 +33982,7 @@ class $0bcbb32f9919749d$export$2e2bcd8739ae039 {
|
|
|
33981
33982
|
}));
|
|
33982
33983
|
for (const addFn of this._addSubscriptions)addFn();
|
|
33983
33984
|
if (this._numRunning > 0 && this._numRunning < this._maxConcurrent) this._next();
|
|
33984
|
-
});
|
|
33985
|
+
}).catch(()=>{});
|
|
33985
33986
|
}
|
|
33986
33987
|
subscribeToAdd(fn) {
|
|
33987
33988
|
this._addSubscriptions.add(fn);
|
|
@@ -36701,6 +36702,11 @@ function $11e7b1ac52642a5f$var$sortEntry(entry) {
|
|
|
36701
36702
|
return entry;
|
|
36702
36703
|
}
|
|
36703
36704
|
function $11e7b1ac52642a5f$export$8bd517cc5b3722f7(a, b) {
|
|
36705
|
+
let difference = new Set();
|
|
36706
|
+
for (let e of a)if (!b.has(e)) difference.add(e);
|
|
36707
|
+
return difference;
|
|
36708
|
+
}
|
|
36709
|
+
function $11e7b1ac52642a5f$export$be646fbd7a3fda37(a, b) {
|
|
36704
36710
|
let difference = new Set();
|
|
36705
36711
|
for (let e of a)if (!b.has(e)) difference.add(e);
|
|
36706
36712
|
for (let d of b)if (!a.has(d)) difference.add(d);
|