time-queues 1.0.3 → 1.0.4
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/README.md +1 -0
- package/package.json +1 -1
- package/src/ListQueue.js +1 -6
- package/src/when-dom-loaded.js +3 -3
- package/src/when-loaded.js +3 -3
package/README.md
CHANGED
|
@@ -330,6 +330,7 @@ This project is licensed under the BSD-3-Clause License.
|
|
|
330
330
|
|
|
331
331
|
## Release History
|
|
332
332
|
|
|
333
|
+
* 1.0.4 *Bug fixes and code simplifications.*
|
|
333
334
|
* 1.0.3 *Updated deps (`list-toolkit`) to fix a minor bug.*
|
|
334
335
|
* 1.0.2 *Updated deps (`list-toolkit`).*
|
|
335
336
|
* 1.0.1 *Minor update in README. No need to upgrade.*
|
package/package.json
CHANGED
package/src/ListQueue.js
CHANGED
|
@@ -40,12 +40,7 @@ export class ListQueue extends MicroTaskQueue {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
dequeue(task) {
|
|
43
|
-
|
|
44
|
-
if (node.value === task) {
|
|
45
|
-
List.pop(node);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
43
|
+
List.pop(task);
|
|
49
44
|
if (!this.paused && this.list.isEmpty && this.stopQueue)
|
|
50
45
|
this.stopQueue = (this.stopQueue(), null);
|
|
51
46
|
return this;
|
package/src/when-dom-loaded.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ValueList from 'list-toolkit/value-list.js';
|
|
4
4
|
|
|
5
|
-
const waitingForDom = new
|
|
5
|
+
const waitingForDom = new ValueList();
|
|
6
6
|
|
|
7
7
|
export const remove = fn => {
|
|
8
8
|
for (const node of waitingForDom.getNodeIterable()) {
|
|
9
9
|
if (node.value === fn) {
|
|
10
|
-
|
|
10
|
+
ValueList.pop(node);
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
}
|
package/src/when-loaded.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ValueList from 'list-toolkit/value-list.js';
|
|
4
4
|
|
|
5
|
-
const waitingForLoad = new
|
|
5
|
+
const waitingForLoad = new ValueList();
|
|
6
6
|
|
|
7
7
|
export const remove = fn => {
|
|
8
8
|
for (const node of waitingForLoad.getNodeIterable()) {
|
|
9
9
|
if (node.value === fn) {
|
|
10
|
-
|
|
10
|
+
ValueList.pop(node);
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
}
|