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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "time-queues",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Time queues to organize multitasking and scheduled tasks.",
5
5
  "type": "module",
6
6
  "exports": {
package/src/ListQueue.js CHANGED
@@ -40,12 +40,7 @@ export class ListQueue extends MicroTaskQueue {
40
40
  }
41
41
 
42
42
  dequeue(task) {
43
- for (const node of this.list.getNodeIterator()) {
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;
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- import List from 'list-toolkit/list.js';
3
+ import ValueList from 'list-toolkit/value-list.js';
4
4
 
5
- const waitingForDom = new List();
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
- List.pop(node);
10
+ ValueList.pop(node);
11
11
  return true;
12
12
  }
13
13
  }
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- import List from 'list-toolkit/list.js';
3
+ import ValueList from 'list-toolkit/value-list.js';
4
4
 
5
- const waitingForLoad = new List();
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
- List.pop(node);
10
+ ValueList.pop(node);
11
11
  return true;
12
12
  }
13
13
  }