collect-your-stuff 2.1.2 → 2.2.0

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.
Files changed (63) hide show
  1. package/README.md +32 -3926
  2. package/browser/collect-your-stuff.js +912 -549
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +6 -11
  5. package/dist/collections/arrayable/ArrayElement.js +5 -7
  6. package/dist/collections/arrayable/Arrayable.d.ts +22 -37
  7. package/dist/collections/arrayable/Arrayable.js +208 -223
  8. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +9 -14
  9. package/dist/collections/doubly-linked-list/DoubleLinker.js +71 -73
  10. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +19 -36
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +310 -327
  12. package/dist/collections/linked-list/LinkedList.d.ts +20 -36
  13. package/dist/collections/linked-list/LinkedList.js +283 -296
  14. package/dist/collections/linked-list/Linker.d.ts +8 -13
  15. package/dist/collections/linked-list/Linker.js +82 -84
  16. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +24 -43
  17. package/dist/collections/linked-tree-list/LinkedTreeList.js +274 -294
  18. package/dist/collections/linked-tree-list/TreeLinker.d.ts +14 -20
  19. package/dist/collections/linked-tree-list/TreeLinker.js +91 -94
  20. package/dist/collections/queue/Queue.d.ts +10 -14
  21. package/dist/collections/queue/Queue.js +114 -121
  22. package/dist/collections/queue/Queueable.d.ts +13 -22
  23. package/dist/collections/queue/Queueable.js +142 -148
  24. package/dist/collections/queue/TaskQueue.d.ts +8 -17
  25. package/dist/collections/queue/TaskQueue.js +128 -137
  26. package/dist/collections/scoped-collection/ScopedCollection.d.ts +42 -0
  27. package/dist/collections/scoped-collection/ScopedCollection.js +81 -0
  28. package/dist/collections/scoped-collection/ScopedCollection.min.js +1 -0
  29. package/dist/collections/stack/Stack.d.ts +11 -15
  30. package/dist/collections/stack/Stack.js +122 -129
  31. package/dist/collections/stack/Stackable.d.ts +9 -16
  32. package/dist/collections/stack/Stackable.js +81 -85
  33. package/dist/collections/stack/TaskStack.d.ts +8 -17
  34. package/dist/collections/stack/TaskStack.js +98 -107
  35. package/dist/main.d.ts +67 -68
  36. package/dist/main.js +8 -4
  37. package/dist/main.min.js +1 -1
  38. package/dist/recipes/ArrayIterator.d.ts +4 -4
  39. package/dist/recipes/ArrayIterator.js +4 -4
  40. package/dist/recipes/DoubleLinkerIterator.d.ts +3 -3
  41. package/dist/recipes/DoubleLinkerIterator.js +3 -3
  42. package/dist/recipes/IsArrayable.d.ts +13 -33
  43. package/dist/recipes/IsQueue.d.ts +4 -9
  44. package/dist/recipes/IsScopedCollection.d.ts +27 -0
  45. package/dist/recipes/IsScopedCollection.js +5 -0
  46. package/dist/recipes/IsScopedCollection.min.js +1 -0
  47. package/dist/recipes/IsStack.d.ts +4 -9
  48. package/dist/recipes/IsTreeNode.d.ts +1 -1
  49. package/dist/recipes/LinkerIterator.d.ts +3 -3
  50. package/dist/recipes/LinkerIterator.js +3 -3
  51. package/dist/recipes/Runnable.d.ts +3 -16
  52. package/dist/recipes/Runnable.js +3 -9
  53. package/dist/recipes/TreeLinkerIterator.d.ts +4 -4
  54. package/dist/recipes/TreeLinkerIterator.js +36 -36
  55. package/dist/recipes/recipes.d.ts +1 -4
  56. package/dist/recipes/recipes.js +19 -22
  57. package/dist/services/parseTree.d.ts +2 -3
  58. package/dist/services/parseTree.js +23 -24
  59. package/dist/services/parseTreeNext.d.ts +2 -3
  60. package/dist/services/parseTreeNext.js +2 -3
  61. package/dist/services/services.d.ts +1 -4
  62. package/dist/services/services.js +19 -22
  63. package/package.json +4 -4
@@ -1,8 +1,5 @@
1
1
  /**
2
- * @file linked list.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.1.0
5
- * @memberOf module:collect-your-stuff
2
+ * linked list.
6
3
  */
7
4
  import { forEachCallback, IsArrayable } from '../../recipes/IsArrayable';
8
5
  import { IsLinker } from '../../recipes/IsLinker';
@@ -26,101 +23,88 @@ export declare class LinkedList implements IsArrayable<Linker>, Iterable<Linker>
26
23
  private countCache;
27
24
  /**
28
25
  * Create the new LinkedList instance.
29
- * @param {Linker} [linkerClass=Linker] The class used to wrap given data as linkers.
26
+ * @param linkerClass The class used to wrap given data as linkers.
30
27
  */
31
28
  constructor(linkerClass?: typeof Linker);
32
29
  /**
33
30
  * Initialize the inner list, should only run once.
34
- * @param {Linker|Array} initialList Give the list of linkers to start in this linked-list.
35
- * @return {LinkedList}
31
+ * @param initialList Give the list of linkers to start in this linked-list.
36
32
  */
37
33
  initialize(initialList: Linker): LinkedList;
38
34
  /**
39
35
  * Retrieve the innerList used (the list itself, not a copy).
40
- * @returns {Linker}
41
36
  */
42
37
  get list(): IsLinker;
43
38
  /**
44
39
  * Retrieve the first Linker in the list.
45
- * @returns {Linker}
46
40
  */
47
41
  get first(): Linker;
48
42
  /**
49
43
  * Retrieve the last Linker in the list. The end is remembered, so this does not walk the list.
50
- * @returns {Linker}
51
44
  */
52
45
  get last(): Linker | null;
53
46
  /**
54
47
  * Return the length of the list. It is kept up to date by the list's own methods, so this does not walk the list
55
48
  * (call reset() after linkers were changed directly).
56
- * @returns {number}
57
49
  */
58
50
  get length(): number;
59
51
  /**
60
52
  * Insert a new node (or data) after a node.
61
- * @param {Linker|*} node The existing node as reference, or null to insert at the start of the list
62
- * @param {Linker|*} newNode The new node to go after the existing node
63
- * @returns {LinkedList}
53
+ * @param node The existing node as reference, or null to insert at the start of the list
54
+ * @param newNode The new node to go after the existing node
64
55
  */
65
56
  insertAfter(node: IsLinker | null, newNode: Linker | any): LinkedList;
66
57
  /**
67
58
  * Insert a new node (or data) before a node.
68
- * @param {Linker|*} node The existing node as reference, or null to insert at the end of the list
69
- * @param {Linker|*} newNode The new node to go before the existing node
70
- * @returns {LinkedList}
59
+ * @param node The existing node as reference, or null to insert at the end of the list
60
+ * @param newNode The new node to go before the existing node
71
61
  * @throws {Error} When the reference node is not in this list
72
62
  */
73
63
  insertBefore(node: IsLinker | null, newNode: Linker | any): LinkedList;
74
64
  /**
75
65
  * Add a node (or data) after the given (or last) node in the list.
76
- * @param {Linker|*} node The new node to add to the end of the list
77
- * @param {Linker} after The existing last node
78
- * @returns {Linker}
66
+ * @param node The new node to add to the end of the list
67
+ * @param after The existing last node
79
68
  */
80
69
  append(node: Linker | any, after?: IsLinker): LinkedList;
81
70
  /**
82
71
  * Add a node (or data) before the given (or first) node in the list.
83
- * @param {Linker|*} node The new node to add to the start of the list
84
- * @param {Linker} before The existing first node
85
- * @returns {Linker}
72
+ * @param node The new node to add to the start of the list
73
+ * @param before The existing first node
86
74
  */
87
75
  prepend(node: Linker | any, before?: IsLinker): LinkedList;
88
76
  /**
89
77
  * Remove a linker from this linked list.
90
- * @param {Linker} node The node we wish to remove (and it will be returned after removal)
91
- * @return {Linker|null} The removed node, or null when it was not in this list (nothing is removed)
78
+ * @param node The node we wish to remove (and it will be returned after removal)
79
+ * @returns The removed node, or null when it was not in this list (nothing is removed)
92
80
  */
93
81
  remove(node: Linker | null): Linker | null;
94
82
  /**
95
83
  * Refresh the remembered end and length of the list by walking it once. The list's own methods keep these up to date,
96
84
  * so this is only needed after linkers were changed directly (for example by setting next on a linker).
97
- * @return {Linker|null} The first linker of the list
85
+ * @returns The first linker of the list
98
86
  */
99
87
  reset(): Linker | null;
100
88
  /**
101
89
  * Retrieve a Linker item from this list by numeric index, otherwise return null.
102
- * @param {number} index The integer number for retrieving a node by position.
103
- * @returns {Linker|null}
90
+ * @param index The integer number for retrieving a node by position.
104
91
  */
105
92
  item(index: number): Linker | null;
106
93
  /**
107
94
  * Be able to run forEach on this LinkedList to iterate over the linkers.
108
- * @param {forEachCallback} callback The function to call for-each linker
109
- * @param {LinkedList} thisArg Optional, 'this' reference
110
- * @returns {LinkedList}
95
+ * @param callback The function to call for-each linker
96
+ * @param thisArg Optional, 'this' reference
111
97
  */
112
98
  forEach(callback: forEachCallback, thisArg?: LinkedList): LinkedList;
113
99
  /**
114
100
  * Be able to iterate over this class.
115
- * @returns {Iterator}
116
101
  */
117
102
  [Symbol.iterator](): Iterator<Linker>;
118
103
  /**
119
104
  * Convert an array to a LinkedList.
120
- * @param {Array} values An array of values which will be converted to linkers in this linked-list
121
- * @param {IsLinker} linkerClass The class to use for each linker
122
- * @param {IsArrayable<Linker>} [classType=LinkedList] Provide the type of IsArrayable to use.
123
- * @returns {LinkedList}
105
+ * @param values An array of values which will be converted to linkers in this linked-list
106
+ * @param linkerClass The class to use for each linker
107
+ * @param classType Provide the type of IsArrayable to use.
124
108
  */
125
109
  static fromArray: (values?: Array<any>, linkerClass?: typeof Linker, classType?: any) => IsArrayable<IsLinker> | any;
126
110
  }