collect-your-stuff 2.1.0 → 2.1.2

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 (69) hide show
  1. package/README.md +898 -213
  2. package/browser/collect-your-stuff.js +2672 -20684
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +38 -38
  5. package/dist/collections/arrayable/ArrayElement.js +66 -66
  6. package/dist/collections/arrayable/Arrayable.d.ts +122 -122
  7. package/dist/collections/arrayable/Arrayable.js +2 -2
  8. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +50 -50
  9. package/dist/collections/doubly-linked-list/DoubleLinker.js +1 -1
  10. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +125 -125
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +3 -3
  12. package/dist/collections/linked-list/LinkedList.d.ts +126 -126
  13. package/dist/collections/linked-list/LinkedList.js +3 -3
  14. package/dist/collections/linked-list/Linker.d.ts +46 -46
  15. package/dist/collections/linked-list/Linker.js +1 -1
  16. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +159 -159
  17. package/dist/collections/linked-tree-list/LinkedTreeList.js +3 -3
  18. package/dist/collections/linked-tree-list/TreeLinker.d.ts +71 -71
  19. package/dist/collections/linked-tree-list/TreeLinker.js +2 -2
  20. package/dist/collections/queue/Queue.d.ts +59 -59
  21. package/dist/collections/queue/Queue.js +11 -9
  22. package/dist/collections/queue/Queueable.d.ts +83 -83
  23. package/dist/collections/queue/Queueable.js +9 -7
  24. package/dist/collections/queue/TaskQueue.d.ts +68 -68
  25. package/dist/collections/queue/TaskQueue.js +2 -2
  26. package/dist/collections/stack/Stack.d.ts +64 -64
  27. package/dist/collections/stack/Stack.js +11 -9
  28. package/dist/collections/stack/Stackable.d.ts +59 -59
  29. package/dist/collections/stack/Stackable.js +1 -1
  30. package/dist/collections/stack/TaskStack.d.ts +65 -65
  31. package/dist/collections/stack/TaskStack.js +2 -2
  32. package/dist/main.d.ts +68 -69
  33. package/dist/main.js +1 -2
  34. package/dist/main.min.js +1 -1
  35. package/dist/recipes/ArrayIterator.d.ts +20 -20
  36. package/dist/recipes/ArrayIterator.js +39 -39
  37. package/dist/recipes/DoubleLinkerIterator.d.ts +18 -18
  38. package/dist/recipes/DoubleLinkerIterator.js +33 -33
  39. package/dist/recipes/IsArrayable.d.ts +105 -105
  40. package/dist/recipes/IsArrayable.js +5 -5
  41. package/dist/recipes/IsDoubleLinker.d.ts +14 -14
  42. package/dist/recipes/IsDoubleLinker.js +5 -5
  43. package/dist/recipes/IsElement.d.ts +14 -14
  44. package/dist/recipes/IsElement.js +5 -5
  45. package/dist/recipes/IsLinker.d.ts +10 -10
  46. package/dist/recipes/IsLinker.js +5 -5
  47. package/dist/recipes/IsQueue.d.ts +37 -37
  48. package/dist/recipes/IsQueue.js +5 -5
  49. package/dist/recipes/IsStack.d.ts +36 -36
  50. package/dist/recipes/IsStack.js +5 -5
  51. package/dist/recipes/IsTree.d.ts +11 -11
  52. package/dist/recipes/IsTree.js +5 -5
  53. package/dist/recipes/IsTreeNode.d.ts +29 -29
  54. package/dist/recipes/IsTreeNode.js +5 -5
  55. package/dist/recipes/LinkerIterator.d.ts +18 -18
  56. package/dist/recipes/LinkerIterator.js +33 -33
  57. package/dist/recipes/Runnable.d.ts +55 -55
  58. package/dist/recipes/Runnable.js +69 -69
  59. package/dist/recipes/TreeLinkerIterator.d.ts +20 -20
  60. package/dist/recipes/TreeLinkerIterator.js +1 -1
  61. package/dist/recipes/recipes.d.ts +15 -15
  62. package/dist/recipes/recipes.js +2 -2
  63. package/dist/services/parseTree.d.ts +9 -9
  64. package/dist/services/parseTree.js +1 -1
  65. package/dist/services/parseTreeNext.d.ts +17 -17
  66. package/dist/services/parseTreeNext.js +42 -42
  67. package/dist/services/services.d.ts +13 -13
  68. package/dist/services/services.js +2 -2
  69. package/package.json +2 -2
@@ -1,65 +1,65 @@
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
+ * @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
+ }
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  })
6
6
  exports.TaskStack = void 0
7
- var _Stackable = require('./Stackable')
8
- var _LinkedList = require('../linked-list/LinkedList')
7
+ const _Stackable = require('./Stackable')
8
+ const _LinkedList = require('../linked-list/LinkedList')
9
9
  /**
10
10
  * @file task stack.
11
11
  * @author Joshua Heagle <joshuaheagle@gmail.com>
package/dist/main.d.ts CHANGED
@@ -1,69 +1,68 @@
1
- /**
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
- */
8
- import 'core-js/stable';
9
- import { ArrayElement } from './collections/arrayable/ArrayElement';
10
- import { Arrayable } from './collections/arrayable/Arrayable';
11
- import { DoubleLinker } from './collections/doubly-linked-list/DoubleLinker';
12
- import { DoublyLinkedList } from './collections/doubly-linked-list/DoublyLinkedList';
13
- import { Linker } from './collections/linked-list/Linker';
14
- import { LinkedList } from './collections/linked-list/LinkedList';
15
- import { TreeLinker } from './collections/linked-tree-list/TreeLinker';
16
- import { LinkedTreeList } from './collections/linked-tree-list/LinkedTreeList';
17
- import { Queueable } from './collections/queue/Queueable';
18
- import { Queue } from './collections/queue/Queue';
19
- import { TaskQueue } from './collections/queue/TaskQueue';
20
- import { Stackable } from './collections/stack/Stackable';
21
- import { Stack } from './collections/stack/Stack';
22
- import { TaskStack } from './collections/stack/TaskStack';
23
- import { recipes } from './recipes/recipes';
24
- import { services } from './services/services';
25
- /**
26
- * TODO:
27
- * 1. Create binary tree. Use the tree, but it has a limit of only two children per parent, and when adding / removing sort is applied. Add sort function in fromArray
28
- * 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.
29
- * 3. Create a graph type which can have directional and undirectional variants for linking nodes
30
- */
31
- export { ArrayElement, Arrayable, DoubleLinker, DoublyLinkedList, Linker, LinkedList, TreeLinker, LinkedTreeList, Queueable, Queue, TaskQueue, Stackable, Stack, TaskStack, recipes, services };
32
- export type { IsArrayable, forEachCallback } from './recipes/IsArrayable';
33
- export type { IsDoubleLinker } from './recipes/IsDoubleLinker';
34
- export type { IsElement } from './recipes/IsElement';
35
- export type { IsLinker } from './recipes/IsLinker';
36
- export type { IsTree } from './recipes/IsTree';
37
- export type { IsTreeNode } from './recipes/IsTreeNode';
38
- export type { IsQueue } from './recipes/IsQueue';
39
- export type { IsStack } from './recipes/IsStack';
40
- export type { IsRunnable, completeResponse } from './recipes/Runnable';
41
- /**
42
- * All methods exported from this module are encapsulated within collect-your-stuff (this default export is the same
43
- * set of classes as the named exports).
44
- */
45
- declare const collectYourStuff: {
46
- ArrayElement: typeof ArrayElement;
47
- Arrayable: typeof Arrayable;
48
- DoubleLinker: typeof DoubleLinker;
49
- DoublyLinkedList: typeof DoublyLinkedList;
50
- Linker: typeof Linker;
51
- LinkedList: typeof LinkedList;
52
- TreeLinker: typeof TreeLinker;
53
- LinkedTreeList: typeof LinkedTreeList;
54
- Queueable: typeof Queueable;
55
- Queue: typeof Queue;
56
- TaskQueue: typeof TaskQueue;
57
- Stackable: typeof Stackable;
58
- Stack: typeof Stack;
59
- TaskStack: typeof TaskStack;
60
- recipes: {
61
- ArrayIterator: typeof import("./recipes/ArrayIterator").ArrayIterator;
62
- Runnable: typeof import("./recipes/Runnable").Runnable;
63
- };
64
- services: {
65
- parseTree: (tree: import("./main").IsTree, callback: import("./main").forEachCallback) => import("./main").IsTree;
66
- parseTreeNext: (treeNode: import("./main").IsTreeNode, boundaryParent?: import("./main").IsTreeNode | null) => import("./main").IsTreeNode | null;
67
- };
68
- };
69
- export default collectYourStuff;
1
+ /**
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
+ */
8
+ import { ArrayElement } from './collections/arrayable/ArrayElement';
9
+ import { Arrayable } from './collections/arrayable/Arrayable';
10
+ import { DoubleLinker } from './collections/doubly-linked-list/DoubleLinker';
11
+ import { DoublyLinkedList } from './collections/doubly-linked-list/DoublyLinkedList';
12
+ import { Linker } from './collections/linked-list/Linker';
13
+ import { LinkedList } from './collections/linked-list/LinkedList';
14
+ import { TreeLinker } from './collections/linked-tree-list/TreeLinker';
15
+ import { LinkedTreeList } from './collections/linked-tree-list/LinkedTreeList';
16
+ import { Queueable } from './collections/queue/Queueable';
17
+ import { Queue } from './collections/queue/Queue';
18
+ import { TaskQueue } from './collections/queue/TaskQueue';
19
+ import { Stackable } from './collections/stack/Stackable';
20
+ import { Stack } from './collections/stack/Stack';
21
+ import { TaskStack } from './collections/stack/TaskStack';
22
+ import { recipes } from './recipes/recipes';
23
+ import { services } from './services/services';
24
+ /**
25
+ * TODO:
26
+ * 1. Create binary tree. Use the tree, but it has a limit of only two children per parent, and when adding / removing sort is applied. Add sort function in fromArray
27
+ * 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
+ * 3. Create a graph type which can have directional and undirectional variants for linking nodes
29
+ */
30
+ export { ArrayElement, Arrayable, DoubleLinker, DoublyLinkedList, Linker, LinkedList, TreeLinker, LinkedTreeList, Queueable, Queue, TaskQueue, Stackable, Stack, TaskStack, recipes, services };
31
+ export type { IsArrayable, forEachCallback } from './recipes/IsArrayable';
32
+ export type { IsDoubleLinker } from './recipes/IsDoubleLinker';
33
+ export type { IsElement } from './recipes/IsElement';
34
+ export type { IsLinker } from './recipes/IsLinker';
35
+ export type { IsTree } from './recipes/IsTree';
36
+ export type { IsTreeNode } from './recipes/IsTreeNode';
37
+ export type { IsQueue } from './recipes/IsQueue';
38
+ export type { IsStack } from './recipes/IsStack';
39
+ export type { IsRunnable, completeResponse } from './recipes/Runnable';
40
+ /**
41
+ * All methods exported from this module are encapsulated within collect-your-stuff (this default export is the same
42
+ * set of classes as the named exports).
43
+ */
44
+ declare const collectYourStuff: {
45
+ ArrayElement: typeof ArrayElement;
46
+ Arrayable: typeof Arrayable;
47
+ DoubleLinker: typeof DoubleLinker;
48
+ DoublyLinkedList: typeof DoublyLinkedList;
49
+ Linker: typeof Linker;
50
+ LinkedList: typeof LinkedList;
51
+ TreeLinker: typeof TreeLinker;
52
+ LinkedTreeList: typeof LinkedTreeList;
53
+ Queueable: typeof Queueable;
54
+ Queue: typeof Queue;
55
+ TaskQueue: typeof TaskQueue;
56
+ Stackable: typeof Stackable;
57
+ Stack: typeof Stack;
58
+ TaskStack: typeof TaskStack;
59
+ recipes: {
60
+ ArrayIterator: typeof import("./recipes/ArrayIterator").ArrayIterator;
61
+ Runnable: typeof import("./recipes/Runnable").Runnable;
62
+ };
63
+ services: {
64
+ parseTree: (tree: import("./main").IsTree, callback: import("./main").forEachCallback) => import("./main").IsTree;
65
+ parseTreeNext: (treeNode: import("./main").IsTreeNode, boundaryParent?: import("./main").IsTreeNode | null) => import("./main").IsTreeNode | null;
66
+ };
67
+ };
68
+ export default collectYourStuff;
package/dist/main.js CHANGED
@@ -100,7 +100,6 @@ Object.defineProperty(exports, 'services', {
100
100
  return _services.services
101
101
  }
102
102
  })
103
- require('core-js/stable')
104
103
  var _ArrayElement = require('./collections/arrayable/ArrayElement')
105
104
  var _Arrayable = require('./collections/arrayable/Arrayable')
106
105
  var _DoubleLinker = require('./collections/doubly-linked-list/DoubleLinker')
@@ -156,7 +155,7 @@ const collectYourStuff = {
156
155
  recipes: _recipes.recipes,
157
156
  services: _services.services
158
157
  }
159
- var _default = exports.default = collectYourStuff
158
+ const _default = exports.default = collectYourStuff
160
159
  if (void 0) {
161
160
  // @ts-ignore
162
161
  (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}}),require("core-js/stable");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,"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,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 {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,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 {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,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 {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,33 +1,33 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.DoubleLinkerIterator = void 0
7
- /**
8
- * Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
9
- */
10
- class DoubleLinkerIterator {
11
- /**
12
- * Create an iterator starting at the given item.
13
- * @param {IsDoubleLinker} current The item to start from.
14
- */
15
- constructor (current) {
16
- this.current = current
17
- }
18
-
19
- /**
20
- * Get the current item and move on to the following one.
21
- * @param {*} [value] Not used, present to match the Iterator interface.
22
- * @return {IteratorResult<IsDoubleLinker>} The current item, or done when there are no more.
23
- */
24
- next (value) {
25
- const result = {
26
- value: this.current,
27
- done: !this.current
28
- }
29
- this.current = this.current ? this.current.next : null
30
- return result
31
- }
32
- }
33
- exports.DoubleLinkerIterator = DoubleLinkerIterator
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.DoubleLinkerIterator = void 0
7
+ /**
8
+ * Class DoubleLinkerIterator returns the next value when using linkers of linked type lists.
9
+ */
10
+ class DoubleLinkerIterator {
11
+ /**
12
+ * Create an iterator starting at the given item.
13
+ * @param {IsDoubleLinker} current The item to start from.
14
+ */
15
+ constructor (current) {
16
+ this.current = current
17
+ }
18
+
19
+ /**
20
+ * Get the current item and move on to the following one.
21
+ * @param {*} [value] Not used, present to match the Iterator interface.
22
+ * @return {IteratorResult<IsDoubleLinker>} The current item, or done when there are no more.
23
+ */
24
+ next (value) {
25
+ const result = {
26
+ value: this.current,
27
+ done: !this.current
28
+ }
29
+ this.current = this.current ? this.current.next : null
30
+ return result
31
+ }
32
+ }
33
+ exports.DoubleLinkerIterator = DoubleLinkerIterator