collect-your-stuff 2.1.1 → 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 (75) hide show
  1. package/README.md +32 -3241
  2. package/browser/collect-your-stuff.js +1585 -1193
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +33 -38
  5. package/dist/collections/arrayable/ArrayElement.js +64 -66
  6. package/dist/collections/arrayable/Arrayable.d.ts +107 -122
  7. package/dist/collections/arrayable/Arrayable.js +208 -223
  8. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +45 -50
  9. package/dist/collections/doubly-linked-list/DoubleLinker.js +71 -73
  10. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +108 -125
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +310 -327
  12. package/dist/collections/linked-list/LinkedList.d.ts +110 -126
  13. package/dist/collections/linked-list/LinkedList.js +283 -296
  14. package/dist/collections/linked-list/Linker.d.ts +41 -46
  15. package/dist/collections/linked-list/Linker.js +82 -84
  16. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +140 -159
  17. package/dist/collections/linked-tree-list/LinkedTreeList.js +274 -294
  18. package/dist/collections/linked-tree-list/TreeLinker.d.ts +65 -71
  19. package/dist/collections/linked-tree-list/TreeLinker.js +91 -94
  20. package/dist/collections/queue/Queue.d.ts +55 -59
  21. package/dist/collections/queue/Queue.js +114 -119
  22. package/dist/collections/queue/Queueable.d.ts +74 -83
  23. package/dist/collections/queue/Queueable.js +142 -146
  24. package/dist/collections/queue/TaskQueue.d.ts +59 -68
  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 +60 -64
  30. package/dist/collections/stack/Stack.js +122 -127
  31. package/dist/collections/stack/Stackable.d.ts +52 -59
  32. package/dist/collections/stack/Stackable.js +81 -85
  33. package/dist/collections/stack/TaskStack.d.ts +56 -65
  34. package/dist/collections/stack/TaskStack.js +98 -107
  35. package/dist/main.d.ts +4 -5
  36. package/dist/main.js +9 -5
  37. package/dist/main.min.js +1 -1
  38. package/dist/recipes/ArrayIterator.d.ts +20 -20
  39. package/dist/recipes/ArrayIterator.js +39 -39
  40. package/dist/recipes/DoubleLinkerIterator.d.ts +18 -18
  41. package/dist/recipes/DoubleLinkerIterator.js +33 -33
  42. package/dist/recipes/IsArrayable.d.ts +85 -105
  43. package/dist/recipes/IsArrayable.js +5 -5
  44. package/dist/recipes/IsDoubleLinker.d.ts +14 -14
  45. package/dist/recipes/IsDoubleLinker.js +5 -5
  46. package/dist/recipes/IsElement.d.ts +14 -14
  47. package/dist/recipes/IsElement.js +5 -5
  48. package/dist/recipes/IsLinker.d.ts +10 -10
  49. package/dist/recipes/IsLinker.js +5 -5
  50. package/dist/recipes/IsQueue.d.ts +32 -37
  51. package/dist/recipes/IsQueue.js +5 -5
  52. package/dist/recipes/IsScopedCollection.d.ts +27 -0
  53. package/dist/recipes/IsScopedCollection.js +5 -0
  54. package/dist/recipes/IsScopedCollection.min.js +1 -0
  55. package/dist/recipes/IsStack.d.ts +31 -36
  56. package/dist/recipes/IsStack.js +5 -5
  57. package/dist/recipes/IsTree.d.ts +11 -11
  58. package/dist/recipes/IsTree.js +5 -5
  59. package/dist/recipes/IsTreeNode.d.ts +29 -29
  60. package/dist/recipes/IsTreeNode.js +5 -5
  61. package/dist/recipes/LinkerIterator.d.ts +18 -18
  62. package/dist/recipes/LinkerIterator.js +33 -33
  63. package/dist/recipes/Runnable.d.ts +42 -55
  64. package/dist/recipes/Runnable.js +63 -69
  65. package/dist/recipes/TreeLinkerIterator.d.ts +20 -20
  66. package/dist/recipes/TreeLinkerIterator.js +36 -36
  67. package/dist/recipes/recipes.d.ts +12 -15
  68. package/dist/recipes/recipes.js +19 -22
  69. package/dist/services/parseTree.d.ts +8 -9
  70. package/dist/services/parseTree.js +23 -24
  71. package/dist/services/parseTreeNext.d.ts +16 -17
  72. package/dist/services/parseTreeNext.js +41 -42
  73. package/dist/services/services.d.ts +10 -13
  74. package/dist/services/services.js +19 -22
  75. package/package.json +4 -4
@@ -1,65 +1,56 @@
1
- /**
2
- * @file task stack.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.0.0
5
- * @memberOf module:collect-your-stuff
6
- */
7
- import { Stackable } from './Stackable';
8
- import { IsArrayable } from '../../recipes/IsArrayable';
9
- import { IsLinker } from '../../recipes/IsLinker';
10
- import { completeResponse } from '../../recipes/Runnable';
11
- /**
12
- * Store a collection of tasks (Stackables) which can only be inserted and removed from the top: pop() takes the task from
13
- * the top and RUNS it. For a plain last-in-first-out collection of items use Stack.
14
- */
15
- export declare class TaskStack {
16
- /** The list which stores the stackables, the first is the top of the stack. */
17
- stackedList: IsArrayable<any>;
18
- private listClass;
19
- private stackableClass;
20
- /**
21
- * Instantiate the state with the starter stacked list.
22
- * @param {Iterable|LinkedList} [stackedList=null] The list of stackables to start in this stack.
23
- * @param {IsArrayable} [listClass=LinkedList] The type of list to create when no stacked list is given.
24
- * @param {Stackable} [stackableClass=Stackable] The class used to wrap stacked items.
25
- */
26
- constructor(stackedList?: IsArrayable<any>, listClass?: any, stackableClass?: typeof Stackable);
27
- /**
28
- * Return true if the stack is empty (there are no tasks in the stacked list)
29
- * @return {boolean}
30
- */
31
- empty(): boolean;
32
- /**
33
- * Take a look at the next stacked task
34
- * @return {Stackable}
35
- */
36
- top(): IsLinker;
37
- /**
38
- * Remove the next stacked task and return it.
39
- * @return {Stackable|null}
40
- */
41
- pop(): Stackable | completeResponse | null;
42
- /**
43
- * Push a stackable task to the top of the stack.
44
- * @param {Stackable|*} stackable Add a new stackable to the top of the stack
45
- */
46
- push(stackable: any): void;
47
- /**
48
- * Remove the next stacked task and return it.
49
- * @return {Stackable|null}
50
- */
51
- remove(): Stackable | null;
52
- /**
53
- * Get the size of the current stack.
54
- * @return {number}
55
- */
56
- size(): number;
57
- /**
58
- * Convert an array to a TaskStack.
59
- * @param {Array} values An array of values which will be converted to stackables in this queue
60
- * @param {Stackable} stackableClass The class to use for each stackable
61
- * @param {TaskStack|Iterable} listClass The class to use to manage the stackables
62
- * @returns {TaskStack}
63
- */
64
- static fromArray: (values?: Array<any>, stackableClass?: typeof Stackable, listClass?: any) => TaskStack;
65
- }
1
+ /**
2
+ * task stack.
3
+ */
4
+ import { Stackable } from './Stackable';
5
+ import { IsArrayable } from '../../recipes/IsArrayable';
6
+ import { IsLinker } from '../../recipes/IsLinker';
7
+ import { completeResponse } from '../../recipes/Runnable';
8
+ /**
9
+ * Store a collection of tasks (Stackables) which can only be inserted and removed from the top: pop() takes the task from
10
+ * the top and RUNS it. For a plain last-in-first-out collection of items use Stack.
11
+ */
12
+ export declare class TaskStack {
13
+ /** The list which stores the stackables, the first is the top of the stack. */
14
+ stackedList: IsArrayable<any>;
15
+ private listClass;
16
+ private stackableClass;
17
+ /**
18
+ * Instantiate the state with the starter stacked list.
19
+ * @param stackedList The list of stackables to start in this stack.
20
+ * @param listClass The type of list to create when no stacked list is given.
21
+ * @param stackableClass The class used to wrap stacked items.
22
+ */
23
+ constructor(stackedList?: IsArrayable<any>, listClass?: any, stackableClass?: typeof Stackable);
24
+ /**
25
+ * Return true if the stack is empty (there are no tasks in the stacked list)
26
+ */
27
+ empty(): boolean;
28
+ /**
29
+ * Take a look at the next stacked task
30
+ */
31
+ top(): IsLinker;
32
+ /**
33
+ * Remove the next stacked task and return it.
34
+ */
35
+ pop(): Stackable | completeResponse | null;
36
+ /**
37
+ * Push a stackable task to the top of the stack.
38
+ * @param stackable Add a new stackable to the top of the stack
39
+ */
40
+ push(stackable: any): void;
41
+ /**
42
+ * Remove the next stacked task and return it.
43
+ */
44
+ remove(): Stackable | null;
45
+ /**
46
+ * Get the size of the current stack.
47
+ */
48
+ size(): number;
49
+ /**
50
+ * Convert an array to a TaskStack.
51
+ * @param values An array of values which will be converted to stackables in this queue
52
+ * @param stackableClass The class to use for each stackable
53
+ * @param listClass The class to use to manage the stackables
54
+ */
55
+ static fromArray: (values?: Array<any>, stackableClass?: typeof Stackable, listClass?: any) => TaskStack;
56
+ }
@@ -1,107 +1,98 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.TaskStack = void 0
7
- var _Stackable = require('./Stackable')
8
- var _LinkedList = require('../linked-list/LinkedList')
9
- /**
10
- * @file task stack.
11
- * @author Joshua Heagle <joshuaheagle@gmail.com>
12
- * @version 1.0.0
13
- * @memberOf module:collect-your-stuff
14
- */
15
-
16
- /**
17
- * Store a collection of tasks (Stackables) which can only be inserted and removed from the top: pop() takes the task from
18
- * the top and RUNS it. For a plain last-in-first-out collection of items use Stack.
19
- */
20
- class TaskStack {
21
- /**
22
- * Instantiate the state with the starter stacked list.
23
- * @param {Iterable|LinkedList} [stackedList=null] The list of stackables to start in this stack.
24
- * @param {IsArrayable} [listClass=LinkedList] The type of list to create when no stacked list is given.
25
- * @param {Stackable} [stackableClass=Stackable] The class used to wrap stacked items.
26
- */
27
- constructor (stackedList = null, listClass = _LinkedList.LinkedList, stackableClass = _Stackable.Stackable) {
28
- this.listClass = listClass
29
- this.stackableClass = stackableClass
30
- if (stackedList === null) {
31
- stackedList = new listClass(stackableClass)
32
- }
33
- this.stackedList = stackedList
34
- }
35
-
36
- /**
37
- * Return true if the stack is empty (there are no tasks in the stacked list)
38
- * @return {boolean}
39
- */
40
- empty () {
41
- return this.size() <= 0
42
- }
43
-
44
- /**
45
- * Take a look at the next stacked task
46
- * @return {Stackable}
47
- */
48
- top () {
49
- return this.stackedList.first
50
- }
51
-
52
- /**
53
- * Remove the next stacked task and return it.
54
- * @return {Stackable|null}
55
- */
56
- pop () {
57
- const next = this.remove()
58
- if (!next) {
59
- return {
60
- success: 'No more stackable tasks in the stack',
61
- error: false,
62
- context: this.stackedList
63
- }
64
- }
65
- return next.run()
66
- }
67
-
68
- /**
69
- * Push a stackable task to the top of the stack.
70
- * @param {Stackable|*} stackable Add a new stackable to the top of the stack
71
- */
72
- push (stackable) {
73
- this.stackedList.prepend(stackable)
74
- }
75
-
76
- /**
77
- * Remove the next stacked task and return it.
78
- * @return {Stackable|null}
79
- */
80
- remove () {
81
- if (this.empty()) {
82
- return null
83
- }
84
- return this.stackedList.remove(this.stackedList.first)
85
- }
86
-
87
- /**
88
- * Get the size of the current stack.
89
- * @return {number}
90
- */
91
- size () {
92
- return this.stackedList.length
93
- }
94
- }
95
- /**
96
- * Convert an array to a TaskStack.
97
- * @param {Array} values An array of values which will be converted to stackables in this queue
98
- * @param {Stackable} stackableClass The class to use for each stackable
99
- * @param {TaskStack|Iterable} listClass The class to use to manage the stackables
100
- * @returns {TaskStack}
101
- */
102
- exports.TaskStack = TaskStack
103
- TaskStack.fromArray = (values = [], stackableClass = _Stackable.Stackable, listClass = _LinkedList.LinkedList) => {
104
- const list = new listClass(stackableClass)
105
- list.initialize(stackableClass.fromArray(values, stackableClass).head)
106
- return new TaskStack(list, listClass, stackableClass)
107
- }
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.TaskStack = void 0
7
+ const _Stackable = require('./Stackable')
8
+ const _LinkedList = require('../linked-list/LinkedList')
9
+ /**
10
+ * task stack.
11
+ */
12
+
13
+ /**
14
+ * Store a collection of tasks (Stackables) which can only be inserted and removed from the top: pop() takes the task from
15
+ * the top and RUNS it. For a plain last-in-first-out collection of items use Stack.
16
+ */
17
+ class TaskStack {
18
+ /**
19
+ * Instantiate the state with the starter stacked list.
20
+ * @param stackedList The list of stackables to start in this stack.
21
+ * @param listClass The type of list to create when no stacked list is given.
22
+ * @param stackableClass The class used to wrap stacked items.
23
+ */
24
+ constructor (stackedList = null, listClass = _LinkedList.LinkedList, stackableClass = _Stackable.Stackable) {
25
+ this.listClass = listClass
26
+ this.stackableClass = stackableClass
27
+ if (stackedList === null) {
28
+ stackedList = new listClass(stackableClass)
29
+ }
30
+ this.stackedList = stackedList
31
+ }
32
+
33
+ /**
34
+ * Return true if the stack is empty (there are no tasks in the stacked list)
35
+ */
36
+ empty () {
37
+ return this.size() <= 0
38
+ }
39
+
40
+ /**
41
+ * Take a look at the next stacked task
42
+ */
43
+ top () {
44
+ return this.stackedList.first
45
+ }
46
+
47
+ /**
48
+ * Remove the next stacked task and return it.
49
+ */
50
+ pop () {
51
+ const next = this.remove()
52
+ if (!next) {
53
+ return {
54
+ success: 'No more stackable tasks in the stack',
55
+ error: false,
56
+ context: this.stackedList
57
+ }
58
+ }
59
+ return next.run()
60
+ }
61
+
62
+ /**
63
+ * Push a stackable task to the top of the stack.
64
+ * @param stackable Add a new stackable to the top of the stack
65
+ */
66
+ push (stackable) {
67
+ this.stackedList.prepend(stackable)
68
+ }
69
+
70
+ /**
71
+ * Remove the next stacked task and return it.
72
+ */
73
+ remove () {
74
+ if (this.empty()) {
75
+ return null
76
+ }
77
+ return this.stackedList.remove(this.stackedList.first)
78
+ }
79
+
80
+ /**
81
+ * Get the size of the current stack.
82
+ */
83
+ size () {
84
+ return this.stackedList.length
85
+ }
86
+ }
87
+ /**
88
+ * Convert an array to a TaskStack.
89
+ * @param values An array of values which will be converted to stackables in this queue
90
+ * @param stackableClass The class to use for each stackable
91
+ * @param listClass The class to use to manage the stackables
92
+ */
93
+ exports.TaskStack = TaskStack
94
+ TaskStack.fromArray = (values = [], stackableClass = _Stackable.Stackable, listClass = _LinkedList.LinkedList) => {
95
+ const list = new listClass(stackableClass)
96
+ list.initialize(stackableClass.fromArray(values, stackableClass).head)
97
+ return new TaskStack(list, listClass, stackableClass)
98
+ }
package/dist/main.d.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  /**
2
2
  * All of the collections available.
3
- * @file
4
- * @author Joshua Heagle <joshuaheagle@gmail.com>
5
- * @version 1.0.0
6
- * @module collect-your-stuff
7
3
  */
8
4
  import { ArrayElement } from './collections/arrayable/ArrayElement';
9
5
  import { Arrayable } from './collections/arrayable/Arrayable';
@@ -16,6 +12,7 @@ import { LinkedTreeList } from './collections/linked-tree-list/LinkedTreeList';
16
12
  import { Queueable } from './collections/queue/Queueable';
17
13
  import { Queue } from './collections/queue/Queue';
18
14
  import { TaskQueue } from './collections/queue/TaskQueue';
15
+ import { ScopedCollection } from './collections/scoped-collection/ScopedCollection';
19
16
  import { Stackable } from './collections/stack/Stackable';
20
17
  import { Stack } from './collections/stack/Stack';
21
18
  import { TaskStack } from './collections/stack/TaskStack';
@@ -27,7 +24,7 @@ import { services } from './services/services';
27
24
  * 2. Create a heap (both min and max heap variants) which is similar to binary tree in structure, but tree having its min / max value as root. and it must insert on the left-most lowest level, and removes from root. Be able to easily swap nodes to ensure min / max ordering.
28
25
  * 3. Create a graph type which can have directional and undirectional variants for linking nodes
29
26
  */
30
- export { ArrayElement, Arrayable, DoubleLinker, DoublyLinkedList, Linker, LinkedList, TreeLinker, LinkedTreeList, Queueable, Queue, TaskQueue, Stackable, Stack, TaskStack, recipes, services };
27
+ export { ArrayElement, Arrayable, DoubleLinker, DoublyLinkedList, Linker, LinkedList, TreeLinker, LinkedTreeList, Queueable, Queue, TaskQueue, ScopedCollection, Stackable, Stack, TaskStack, recipes, services };
31
28
  export type { IsArrayable, forEachCallback } from './recipes/IsArrayable';
32
29
  export type { IsDoubleLinker } from './recipes/IsDoubleLinker';
33
30
  export type { IsElement } from './recipes/IsElement';
@@ -35,6 +32,7 @@ export type { IsLinker } from './recipes/IsLinker';
35
32
  export type { IsTree } from './recipes/IsTree';
36
33
  export type { IsTreeNode } from './recipes/IsTreeNode';
37
34
  export type { IsQueue } from './recipes/IsQueue';
35
+ export type { IsScopedCollection } from './recipes/IsScopedCollection';
38
36
  export type { IsStack } from './recipes/IsStack';
39
37
  export type { IsRunnable, completeResponse } from './recipes/Runnable';
40
38
  /**
@@ -53,6 +51,7 @@ declare const collectYourStuff: {
53
51
  Queueable: typeof Queueable;
54
52
  Queue: typeof Queue;
55
53
  TaskQueue: typeof TaskQueue;
54
+ ScopedCollection: typeof ScopedCollection;
56
55
  Stackable: typeof Stackable;
57
56
  Stack: typeof Stack;
58
57
  TaskStack: typeof TaskStack;
package/dist/main.js CHANGED
@@ -57,6 +57,12 @@ Object.defineProperty(exports, 'Queueable', {
57
57
  return _Queueable.Queueable
58
58
  }
59
59
  })
60
+ Object.defineProperty(exports, 'ScopedCollection', {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _ScopedCollection.ScopedCollection
64
+ }
65
+ })
60
66
  Object.defineProperty(exports, 'Stack', {
61
67
  enumerable: true,
62
68
  get: function () {
@@ -111,6 +117,7 @@ var _LinkedTreeList = require('./collections/linked-tree-list/LinkedTreeList')
111
117
  var _Queueable = require('./collections/queue/Queueable')
112
118
  var _Queue = require('./collections/queue/Queue')
113
119
  var _TaskQueue = require('./collections/queue/TaskQueue')
120
+ var _ScopedCollection = require('./collections/scoped-collection/ScopedCollection')
114
121
  var _Stackable = require('./collections/stack/Stackable')
115
122
  var _Stack = require('./collections/stack/Stack')
116
123
  var _TaskStack = require('./collections/stack/TaskStack')
@@ -118,10 +125,6 @@ var _recipes = require('./recipes/recipes')
118
125
  var _services = require('./services/services')
119
126
  /**
120
127
  * All of the collections available.
121
- * @file
122
- * @author Joshua Heagle <joshuaheagle@gmail.com>
123
- * @version 1.0.0
124
- * @module collect-your-stuff
125
128
  */
126
129
 
127
130
  /**
@@ -149,13 +152,14 @@ const collectYourStuff = {
149
152
  Queueable: _Queueable.Queueable,
150
153
  Queue: _Queue.Queue,
151
154
  TaskQueue: _TaskQueue.TaskQueue,
155
+ ScopedCollection: _ScopedCollection.ScopedCollection,
152
156
  Stackable: _Stackable.Stackable,
153
157
  Stack: _Stack.Stack,
154
158
  TaskStack: _TaskStack.TaskStack,
155
159
  recipes: _recipes.recipes,
156
160
  services: _services.services
157
161
  }
158
- var _default = exports.default = collectYourStuff
162
+ const _default = exports.default = collectYourStuff
159
163
  if (void 0) {
160
164
  // @ts-ignore
161
165
  (void 0).collectYourStuff = collectYourStuff
package/dist/main.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ArrayElement",{enumerable:!0,get:function(){return _ArrayElement.ArrayElement}}),Object.defineProperty(exports,"Arrayable",{enumerable:!0,get:function(){return _Arrayable.Arrayable}}),Object.defineProperty(exports,"DoubleLinker",{enumerable:!0,get:function(){return _DoubleLinker.DoubleLinker}}),Object.defineProperty(exports,"DoublyLinkedList",{enumerable:!0,get:function(){return _DoublyLinkedList.DoublyLinkedList}}),Object.defineProperty(exports,"LinkedList",{enumerable:!0,get:function(){return _LinkedList.LinkedList}}),Object.defineProperty(exports,"LinkedTreeList",{enumerable:!0,get:function(){return _LinkedTreeList.LinkedTreeList}}),Object.defineProperty(exports,"Linker",{enumerable:!0,get:function(){return _Linker.Linker}}),Object.defineProperty(exports,"Queue",{enumerable:!0,get:function(){return _Queue.Queue}}),Object.defineProperty(exports,"Queueable",{enumerable:!0,get:function(){return _Queueable.Queueable}}),Object.defineProperty(exports,"Stack",{enumerable:!0,get:function(){return _Stack.Stack}}),Object.defineProperty(exports,"Stackable",{enumerable:!0,get:function(){return _Stackable.Stackable}}),Object.defineProperty(exports,"TaskQueue",{enumerable:!0,get:function(){return _TaskQueue.TaskQueue}}),Object.defineProperty(exports,"TaskStack",{enumerable:!0,get:function(){return _TaskStack.TaskStack}}),Object.defineProperty(exports,"TreeLinker",{enumerable:!0,get:function(){return _TreeLinker.TreeLinker}}),exports.default=void 0,Object.defineProperty(exports,"recipes",{enumerable:!0,get:function(){return _recipes.recipes}}),Object.defineProperty(exports,"services",{enumerable:!0,get:function(){return _services.services}});var _ArrayElement=require("./collections/arrayable/ArrayElement"),_Arrayable=require("./collections/arrayable/Arrayable"),_DoubleLinker=require("./collections/doubly-linked-list/DoubleLinker"),_DoublyLinkedList=require("./collections/doubly-linked-list/DoublyLinkedList"),_Linker=require("./collections/linked-list/Linker"),_LinkedList=require("./collections/linked-list/LinkedList"),_TreeLinker=require("./collections/linked-tree-list/TreeLinker"),_LinkedTreeList=require("./collections/linked-tree-list/LinkedTreeList"),_Queueable=require("./collections/queue/Queueable"),_Queue=require("./collections/queue/Queue"),_TaskQueue=require("./collections/queue/TaskQueue"),_Stackable=require("./collections/stack/Stackable"),_Stack=require("./collections/stack/Stack"),_TaskStack=require("./collections/stack/TaskStack"),_recipes=require("./recipes/recipes"),_services=require("./services/services");const collectYourStuff={ArrayElement:_ArrayElement.ArrayElement,Arrayable:_Arrayable.Arrayable,DoubleLinker:_DoubleLinker.DoubleLinker,DoublyLinkedList:_DoublyLinkedList.DoublyLinkedList,Linker:_Linker.Linker,LinkedList:_LinkedList.LinkedList,TreeLinker:_TreeLinker.TreeLinker,LinkedTreeList:_LinkedTreeList.LinkedTreeList,Queueable:_Queueable.Queueable,Queue:_Queue.Queue,TaskQueue:_TaskQueue.TaskQueue,Stackable:_Stackable.Stackable,Stack:_Stack.Stack,TaskStack:_TaskStack.TaskStack,recipes:_recipes.recipes,services:_services.services};var _default=exports.default=collectYourStuff;"undefined"!=typeof window&&(window.collectYourStuff=collectYourStuff);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ArrayElement",{enumerable:!0,get:function(){return _ArrayElement.ArrayElement}}),Object.defineProperty(exports,"Arrayable",{enumerable:!0,get:function(){return _Arrayable.Arrayable}}),Object.defineProperty(exports,"DoubleLinker",{enumerable:!0,get:function(){return _DoubleLinker.DoubleLinker}}),Object.defineProperty(exports,"DoublyLinkedList",{enumerable:!0,get:function(){return _DoublyLinkedList.DoublyLinkedList}}),Object.defineProperty(exports,"LinkedList",{enumerable:!0,get:function(){return _LinkedList.LinkedList}}),Object.defineProperty(exports,"LinkedTreeList",{enumerable:!0,get:function(){return _LinkedTreeList.LinkedTreeList}}),Object.defineProperty(exports,"Linker",{enumerable:!0,get:function(){return _Linker.Linker}}),Object.defineProperty(exports,"Queue",{enumerable:!0,get:function(){return _Queue.Queue}}),Object.defineProperty(exports,"Queueable",{enumerable:!0,get:function(){return _Queueable.Queueable}}),Object.defineProperty(exports,"ScopedCollection",{enumerable:!0,get:function(){return _ScopedCollection.ScopedCollection}}),Object.defineProperty(exports,"Stack",{enumerable:!0,get:function(){return _Stack.Stack}}),Object.defineProperty(exports,"Stackable",{enumerable:!0,get:function(){return _Stackable.Stackable}}),Object.defineProperty(exports,"TaskQueue",{enumerable:!0,get:function(){return _TaskQueue.TaskQueue}}),Object.defineProperty(exports,"TaskStack",{enumerable:!0,get:function(){return _TaskStack.TaskStack}}),Object.defineProperty(exports,"TreeLinker",{enumerable:!0,get:function(){return _TreeLinker.TreeLinker}}),exports.default=void 0,Object.defineProperty(exports,"recipes",{enumerable:!0,get:function(){return _recipes.recipes}}),Object.defineProperty(exports,"services",{enumerable:!0,get:function(){return _services.services}});var _ArrayElement=require("./collections/arrayable/ArrayElement"),_Arrayable=require("./collections/arrayable/Arrayable"),_DoubleLinker=require("./collections/doubly-linked-list/DoubleLinker"),_DoublyLinkedList=require("./collections/doubly-linked-list/DoublyLinkedList"),_Linker=require("./collections/linked-list/Linker"),_LinkedList=require("./collections/linked-list/LinkedList"),_TreeLinker=require("./collections/linked-tree-list/TreeLinker"),_LinkedTreeList=require("./collections/linked-tree-list/LinkedTreeList"),_Queueable=require("./collections/queue/Queueable"),_Queue=require("./collections/queue/Queue"),_TaskQueue=require("./collections/queue/TaskQueue"),_ScopedCollection=require("./collections/scoped-collection/ScopedCollection"),_Stackable=require("./collections/stack/Stackable"),_Stack=require("./collections/stack/Stack"),_TaskStack=require("./collections/stack/TaskStack"),_recipes=require("./recipes/recipes"),_services=require("./services/services");const collectYourStuff={ArrayElement:_ArrayElement.ArrayElement,Arrayable:_Arrayable.Arrayable,DoubleLinker:_DoubleLinker.DoubleLinker,DoublyLinkedList:_DoublyLinkedList.DoublyLinkedList,Linker:_Linker.Linker,LinkedList:_LinkedList.LinkedList,TreeLinker:_TreeLinker.TreeLinker,LinkedTreeList:_LinkedTreeList.LinkedTreeList,Queueable:_Queueable.Queueable,Queue:_Queue.Queue,TaskQueue:_TaskQueue.TaskQueue,ScopedCollection:_ScopedCollection.ScopedCollection,Stackable:_Stackable.Stackable,Stack:_Stack.Stack,TaskStack:_TaskStack.TaskStack,recipes:_recipes.recipes,services:_services.services};var _default=exports.default=collectYourStuff;"undefined"!=typeof window&&(window.collectYourStuff=collectYourStuff);
@@ -1,20 +1,20 @@
1
- import { IsElement } from './IsElement';
2
- /**
3
- * Class ArrayIterator returns the next value when using elements of array type list.
4
- */
5
- export declare class ArrayIterator implements Iterator<IsElement> {
6
- private readonly innerList;
7
- private index;
8
- /**
9
- * Create an iterator over the given array.
10
- * @param {Array<IsElement>} innerList The elements to iterate over.
11
- * @param {number} [index=0] The position to start from.
12
- */
13
- constructor(innerList: Array<IsElement>, index?: number);
14
- /**
15
- * Get the next element, moving the iterator forward.
16
- * @param {*} [value] Not used, present to match the Iterator interface.
17
- * @return {IteratorResult<IsElement>} The next element, or done when there are no more.
18
- */
19
- next(value?: any): IteratorResult<IsElement>;
20
- }
1
+ import { IsElement } from './IsElement';
2
+ /**
3
+ * Class ArrayIterator returns the next value when using elements of array type list.
4
+ */
5
+ export declare class ArrayIterator implements Iterator<IsElement> {
6
+ private readonly innerList;
7
+ private index;
8
+ /**
9
+ * Create an iterator over the given array.
10
+ * @param innerList The elements to iterate over.
11
+ * @param index The position to start from.
12
+ */
13
+ constructor(innerList: Array<IsElement>, index?: number);
14
+ /**
15
+ * Get the next element, moving the iterator forward.
16
+ * @param value Not used, present to match the Iterator interface.
17
+ * @returns The next element, or done when there are no more.
18
+ */
19
+ next(value?: any): IteratorResult<IsElement>;
20
+ }
@@ -1,39 +1,39 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.ArrayIterator = void 0
7
- /**
8
- * Class ArrayIterator returns the next value when using elements of array type list.
9
- */
10
- class ArrayIterator {
11
- /**
12
- * Create an iterator over the given array.
13
- * @param {Array<IsElement>} innerList The elements to iterate over.
14
- * @param {number} [index=0] The position to start from.
15
- */
16
- constructor (innerList, index = 0) {
17
- this.innerList = innerList
18
- this.index = index
19
- }
20
-
21
- /**
22
- * Get the next element, moving the iterator forward.
23
- * @param {*} [value] Not used, present to match the Iterator interface.
24
- * @return {IteratorResult<IsElement>} The next element, or done when there are no more.
25
- */
26
- next (value) {
27
- if (this.index < this.innerList.length) {
28
- return {
29
- value: this.innerList[this.index++],
30
- done: false
31
- }
32
- }
33
- return {
34
- value: undefined,
35
- done: true
36
- }
37
- }
38
- }
39
- exports.ArrayIterator = ArrayIterator
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.ArrayIterator = void 0
7
+ /**
8
+ * Class ArrayIterator returns the next value when using elements of array type list.
9
+ */
10
+ class ArrayIterator {
11
+ /**
12
+ * Create an iterator over the given array.
13
+ * @param innerList The elements to iterate over.
14
+ * @param index The position to start from.
15
+ */
16
+ constructor (innerList, index = 0) {
17
+ this.innerList = innerList
18
+ this.index = index
19
+ }
20
+
21
+ /**
22
+ * Get the next element, moving the iterator forward.
23
+ * @param value Not used, present to match the Iterator interface.
24
+ * @returns The next element, or done when there are no more.
25
+ */
26
+ next (value) {
27
+ if (this.index < this.innerList.length) {
28
+ return {
29
+ value: this.innerList[this.index++],
30
+ done: false
31
+ }
32
+ }
33
+ return {
34
+ value: undefined,
35
+ done: true
36
+ }
37
+ }
38
+ }
39
+ exports.ArrayIterator = ArrayIterator
@@ -1,18 +1,18 @@
1
- import { IsDoubleLinker } from './IsDoubleLinker';
2
- /**
3
- * Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
4
- */
5
- export declare class DoubleLinkerIterator implements Iterator<IsDoubleLinker> {
6
- private current;
7
- /**
8
- * Create an iterator starting at the given item.
9
- * @param {IsDoubleLinker} current The item to start from.
10
- */
11
- constructor(current: IsDoubleLinker);
12
- /**
13
- * Get the current item and move on to the following one.
14
- * @param {*} [value] Not used, present to match the Iterator interface.
15
- * @return {IteratorResult<IsDoubleLinker>} The current item, or done when there are no more.
16
- */
17
- next(value?: any): IteratorResult<IsDoubleLinker>;
18
- }
1
+ import { IsDoubleLinker } from './IsDoubleLinker';
2
+ /**
3
+ * Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
4
+ */
5
+ export declare class DoubleLinkerIterator implements Iterator<IsDoubleLinker> {
6
+ private current;
7
+ /**
8
+ * Create an iterator starting at the given item.
9
+ * @param current The item to start from.
10
+ */
11
+ constructor(current: IsDoubleLinker);
12
+ /**
13
+ * Get the current item and move on to the following one.
14
+ * @param value Not used, present to match the Iterator interface.
15
+ * @returns The current item, or done when there are no more.
16
+ */
17
+ next(value?: any): IteratorResult<IsDoubleLinker>;
18
+ }