data-structure-typed 1.21.2 → 1.21.3

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 (115) hide show
  1. package/README.md +10 -13
  2. package/dist/bundle.js +1 -1
  3. package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +3 -3
  4. package/dist/data-structures/binary-tree/abstract-binary-tree.js +1 -1
  5. package/dist/data-structures/binary-tree/avl-tree.d.ts +2 -2
  6. package/dist/data-structures/binary-tree/binary-tree.d.ts +2 -2
  7. package/dist/data-structures/binary-tree/bst.d.ts +3 -3
  8. package/dist/data-structures/binary-tree/bst.js +1 -1
  9. package/dist/data-structures/binary-tree/rb-tree.d.ts +2 -2
  10. package/dist/data-structures/binary-tree/rb-tree.js +1 -1
  11. package/dist/data-structures/binary-tree/segment-tree.d.ts +1 -1
  12. package/dist/data-structures/binary-tree/tree-multiset.d.ts +3 -3
  13. package/dist/data-structures/binary-tree/tree-multiset.js +1 -1
  14. package/dist/data-structures/graph/abstract-graph.d.ts +8 -8
  15. package/dist/data-structures/graph/abstract-graph.js +6 -6
  16. package/dist/data-structures/graph/directed-graph.d.ts +2 -2
  17. package/dist/data-structures/graph/map-graph.d.ts +1 -1
  18. package/dist/data-structures/graph/undirected-graph.d.ts +2 -2
  19. package/dist/data-structures/heap/heap.d.ts +1 -1
  20. package/dist/data-structures/heap/heap.js +1 -1
  21. package/dist/data-structures/heap/max-heap.d.ts +1 -1
  22. package/dist/data-structures/heap/min-heap.d.ts +1 -1
  23. package/dist/data-structures/index.d.ts +0 -2
  24. package/dist/data-structures/index.js +0 -2
  25. package/dist/data-structures/matrix/navigator.d.ts +1 -1
  26. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +1 -1
  27. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +1 -1
  28. package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +2 -0
  31. package/dist/{data-structures/interfaces → interfaces}/abstract-binary-tree.d.ts +1 -1
  32. package/dist/{data-structures/interfaces → interfaces}/avl-tree.d.ts +1 -1
  33. package/dist/{data-structures/interfaces → interfaces}/binary-tree.d.ts +1 -1
  34. package/dist/{data-structures/interfaces → interfaces}/bst.d.ts +1 -1
  35. package/dist/{data-structures/interfaces → interfaces}/rb-tree.d.ts +1 -1
  36. package/dist/{data-structures/interfaces → interfaces}/tree-multiset.d.ts +1 -1
  37. package/dist/{data-structures/types → types/data-structures}/abstract-binary-tree.d.ts +1 -1
  38. package/dist/{data-structures/types → types/data-structures}/avl-tree.d.ts +1 -1
  39. package/dist/{data-structures/types → types/data-structures}/binary-tree.d.ts +1 -1
  40. package/dist/{data-structures/types → types/data-structures}/bst.d.ts +1 -1
  41. package/dist/{data-structures/types → types/data-structures}/index.d.ts +0 -1
  42. package/dist/{data-structures/types → types/data-structures}/index.js +0 -1
  43. package/dist/{data-structures/types → types/data-structures}/rb-tree.d.ts +1 -1
  44. package/dist/{data-structures/types → types/data-structures}/tree-multiset.d.ts +1 -1
  45. package/dist/types/index.d.ts +3 -0
  46. package/dist/types/index.js +19 -0
  47. package/dist/utils/index.d.ts +0 -2
  48. package/dist/utils/index.js +0 -2
  49. package/dist/utils/utils.d.ts +1 -1
  50. package/package.json +21 -24
  51. package/.dependency-cruiser.js +0 -449
  52. package/dist/utils/validate-type.d.ts +0 -45
  53. package/dist/utils/validate-type.js +0 -58
  54. package/jest.config.js +0 -5
  55. package/rename_clear_files.sh +0 -29
  56. package/tsconfig.json +0 -38
  57. package/webpack.config.js +0 -27
  58. /package/dist/{data-structures/interfaces → interfaces}/abstract-binary-tree.js +0 -0
  59. /package/dist/{data-structures/interfaces → interfaces}/abstract-graph.d.ts +0 -0
  60. /package/dist/{data-structures/interfaces → interfaces}/abstract-graph.js +0 -0
  61. /package/dist/{data-structures/interfaces → interfaces}/avl-tree.js +0 -0
  62. /package/dist/{data-structures/interfaces → interfaces}/binary-tree.js +0 -0
  63. /package/dist/{data-structures/interfaces → interfaces}/bst.js +0 -0
  64. /package/dist/{data-structures/interfaces → interfaces}/directed-graph.d.ts +0 -0
  65. /package/dist/{data-structures/interfaces → interfaces}/directed-graph.js +0 -0
  66. /package/dist/{data-structures/interfaces → interfaces}/doubly-linked-list.d.ts +0 -0
  67. /package/dist/{data-structures/interfaces → interfaces}/doubly-linked-list.js +0 -0
  68. /package/dist/{data-structures/interfaces → interfaces}/heap.d.ts +0 -0
  69. /package/dist/{data-structures/interfaces → interfaces}/heap.js +0 -0
  70. /package/dist/{data-structures/interfaces → interfaces}/index.d.ts +0 -0
  71. /package/dist/{data-structures/interfaces → interfaces}/index.js +0 -0
  72. /package/dist/{data-structures/interfaces → interfaces}/navigator.d.ts +0 -0
  73. /package/dist/{data-structures/interfaces → interfaces}/navigator.js +0 -0
  74. /package/dist/{data-structures/interfaces → interfaces}/priority-queue.d.ts +0 -0
  75. /package/dist/{data-structures/interfaces → interfaces}/priority-queue.js +0 -0
  76. /package/dist/{data-structures/interfaces → interfaces}/rb-tree.js +0 -0
  77. /package/dist/{data-structures/interfaces → interfaces}/segment-tree.d.ts +0 -0
  78. /package/dist/{data-structures/interfaces → interfaces}/segment-tree.js +0 -0
  79. /package/dist/{data-structures/interfaces → interfaces}/singly-linked-list.d.ts +0 -0
  80. /package/dist/{data-structures/interfaces → interfaces}/singly-linked-list.js +0 -0
  81. /package/dist/{data-structures/interfaces → interfaces}/tree-multiset.js +0 -0
  82. /package/dist/{data-structures/interfaces → interfaces}/undirected-graph.d.ts +0 -0
  83. /package/dist/{data-structures/interfaces → interfaces}/undirected-graph.js +0 -0
  84. /package/dist/{data-structures/types → types/data-structures}/abstract-binary-tree.js +0 -0
  85. /package/dist/{data-structures/types → types/data-structures}/abstract-graph.d.ts +0 -0
  86. /package/dist/{data-structures/types → types/data-structures}/abstract-graph.js +0 -0
  87. /package/dist/{data-structures/types → types/data-structures}/avl-tree.js +0 -0
  88. /package/dist/{data-structures/types → types/data-structures}/binary-tree.js +0 -0
  89. /package/dist/{data-structures/types → types/data-structures}/bst.js +0 -0
  90. /package/dist/{data-structures/types → types/data-structures}/directed-graph.d.ts +0 -0
  91. /package/dist/{data-structures/types → types/data-structures}/directed-graph.js +0 -0
  92. /package/dist/{data-structures/types → types/data-structures}/doubly-linked-list.d.ts +0 -0
  93. /package/dist/{data-structures/types → types/data-structures}/doubly-linked-list.js +0 -0
  94. /package/dist/{data-structures/types → types/data-structures}/heap.d.ts +0 -0
  95. /package/dist/{data-structures/types → types/data-structures}/heap.js +0 -0
  96. /package/dist/{data-structures/types → types/data-structures}/map-graph.d.ts +0 -0
  97. /package/dist/{data-structures/types → types/data-structures}/map-graph.js +0 -0
  98. /package/dist/{data-structures/types → types/data-structures}/navigator.d.ts +0 -0
  99. /package/dist/{data-structures/types → types/data-structures}/navigator.js +0 -0
  100. /package/dist/{data-structures/types → types/data-structures}/priority-queue.d.ts +0 -0
  101. /package/dist/{data-structures/types → types/data-structures}/priority-queue.js +0 -0
  102. /package/dist/{data-structures/types → types/data-structures}/rb-tree.js +0 -0
  103. /package/dist/{data-structures/types → types/data-structures}/segment-tree.d.ts +0 -0
  104. /package/dist/{data-structures/types → types/data-structures}/segment-tree.js +0 -0
  105. /package/dist/{data-structures/types → types/data-structures}/singly-linked-list.d.ts +0 -0
  106. /package/dist/{data-structures/types → types/data-structures}/singly-linked-list.js +0 -0
  107. /package/dist/{data-structures/types → types/data-structures}/tree-multiset.js +0 -0
  108. /package/dist/{data-structures/types → types}/helpers.d.ts +0 -0
  109. /package/dist/{data-structures/types → types}/helpers.js +0 -0
  110. /package/dist/{utils/types → types/utils}/index.d.ts +0 -0
  111. /package/dist/{utils/types → types/utils}/index.js +0 -0
  112. /package/dist/{utils/types → types/utils}/utils.d.ts +0 -0
  113. /package/dist/{utils/types → types/utils}/utils.js +0 -0
  114. /package/dist/{utils/types → types/utils}/validate-type.d.ts +0 -0
  115. /package/dist/{utils/types → types/utils}/validate-type.js +0 -0
package/README.md CHANGED
@@ -3,8 +3,7 @@
3
3
  ## Brief
4
4
  Javascript & TypeScript Data Structure collections.
5
5
 
6
- ## Algorithms
7
-
6
+ ## Algorithms
8
7
  DFS, DFSIterative, BFS, morris, Bellman-Ford Algorithm, Dijkstra's Algorithm, Floyd-Warshall Algorithm, Tarjan's Algorithm. Listed only a few out, you can discover more in API docs
9
8
 
10
9
  ## Code design
@@ -20,13 +19,13 @@ npm install data-structure-typed
20
19
  ```bash
21
20
  yarn add data-structure-typed
22
21
  ```
23
- ### cdn
22
+ ### CDN
24
23
  ```html
25
24
  <script src="https://cdn.jsdelivr.net/npm/data-structure-typed/dist/bundle.js"></script>
26
25
  ```
27
26
  ```javascript
28
- const {AVLTree, AVLTreeNode, BST, Trie, DirectedGraph, DirectedVertex, TreeMultiset} = dataStructureTyped;
29
- const {MinHeap, SinglyLinkedList, DirectedVertex, Stack} = dataStructureTyped;
27
+ const {AVLTree} = dataStructureTyped;
28
+ const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedGraph, DirectedVertex, TreeMultiset} = dataStructureTyped;
30
29
  ```
31
30
 
32
31
  ![](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/examples/dfs-pre-order.webp?raw=true)
@@ -74,7 +73,7 @@ const {MinHeap, SinglyLinkedList, DirectedVertex, Stack} = dataStructureTyped;
74
73
  bst.get(6); // null
75
74
  bst.isAVLBalanced(); // true or false
76
75
  const bfsIDs = bst.BFS();
77
- bfsIDs[0] === 11; // true
76
+ bfsIDs[0] === 11; // true
78
77
  expect(bfsIDs[0]).toBe(11);
79
78
 
80
79
  const objBST = new BST<BSTNode<{ id: number, keyA: number }>>();
@@ -118,7 +117,7 @@ const {MinHeap, SinglyLinkedList, DirectedVertex, Stack} = dataStructureTyped;
118
117
  bst.get(6); // null
119
118
  bst.isAVLBalanced(); // true or false
120
119
  const bfsIDs = bst.BFS();
121
- bfsIDs[0] === 11; // true
120
+ bfsIDs[0] === 11; // true
122
121
  expect(bfsIDs[0]).toBe(11);
123
122
 
124
123
  const objBST = new BST();
@@ -158,8 +157,8 @@ import {DirectedGraph} from 'data-structure-typed';
158
157
  graph.hasVertex('C'); // false
159
158
 
160
159
  graph.addEdge('A', 'B');
161
- graph.hasEdge('A', 'B'); // true
162
- graph.hasEdge('B', 'A'); // false
160
+ graph.hasEdge('A', 'B'); // true
161
+ graph.hasEdge('B', 'A'); // false
163
162
 
164
163
  graph.removeEdgeSrcToDest('A', 'B');
165
164
  graph.hasEdge('A', 'B'); // false
@@ -204,10 +203,8 @@ import {UndirectedGraph} from 'data-structure-typed';
204
203
  <tbody>
205
204
  <tr>
206
205
  <td>Binary Tree</td>
207
- <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt="">
208
- </img></td>
209
- <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt="">
210
- </img></td>
206
+ <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
207
+ <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
211
208
  <td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryTree.html"><span>Binary Tree</span></a></td>
212
209
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
213
210
  </tr>