data-structure-typed 1.33.7 → 1.33.9
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/CHANGELOG.md +1 -1
- package/README.md +25 -14
- package/package.json +22 -22
- package/.prettierrc.js +0 -16
- package/coverage/coverage-final.json +0 -68
- package/coverage/coverage-summary.json +0 -69
- package/docs/.nojekyll +0 -1
- package/docs/index.html +0 -875
- package/docs/modules.html +0 -336
- package/jest.config.js +0 -8
- package/src/data-structures/binary-tree/aa-tree.ts +0 -1
- package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -1608
- package/src/data-structures/binary-tree/avl-tree.ts +0 -307
- package/src/data-structures/binary-tree/b-tree.ts +0 -1
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -76
- package/src/data-structures/binary-tree/binary-tree.ts +0 -47
- package/src/data-structures/binary-tree/bst.ts +0 -537
- package/src/data-structures/binary-tree/index.ts +0 -12
- package/src/data-structures/binary-tree/rb-tree.ts +0 -366
- package/src/data-structures/binary-tree/segment-tree.ts +0 -260
- package/src/data-structures/binary-tree/splay-tree.ts +0 -1
- package/src/data-structures/binary-tree/tree-multiset.ts +0 -700
- package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
- package/src/data-structures/graph/abstract-graph.ts +0 -1040
- package/src/data-structures/graph/directed-graph.ts +0 -470
- package/src/data-structures/graph/index.ts +0 -4
- package/src/data-structures/graph/map-graph.ts +0 -129
- package/src/data-structures/graph/undirected-graph.ts +0 -274
- package/src/data-structures/hash/coordinate-map.ts +0 -67
- package/src/data-structures/hash/coordinate-set.ts +0 -56
- package/src/data-structures/hash/hash-map.ts +0 -203
- package/src/data-structures/hash/hash-table.ts +0 -277
- package/src/data-structures/hash/index.ts +0 -7
- package/src/data-structures/hash/pair.ts +0 -1
- package/src/data-structures/hash/tree-map.ts +0 -1
- package/src/data-structures/hash/tree-set.ts +0 -1
- package/src/data-structures/heap/heap.ts +0 -212
- package/src/data-structures/heap/index.ts +0 -3
- package/src/data-structures/heap/max-heap.ts +0 -31
- package/src/data-structures/heap/min-heap.ts +0 -32
- package/src/data-structures/index.ts +0 -11
- package/src/data-structures/linked-list/doubly-linked-list.ts +0 -636
- package/src/data-structures/linked-list/index.ts +0 -3
- package/src/data-structures/linked-list/singly-linked-list.ts +0 -501
- package/src/data-structures/linked-list/skip-linked-list.ts +0 -166
- package/src/data-structures/matrix/index.ts +0 -4
- package/src/data-structures/matrix/matrix.ts +0 -27
- package/src/data-structures/matrix/matrix2d.ts +0 -213
- package/src/data-structures/matrix/navigator.ts +0 -121
- package/src/data-structures/matrix/vector2d.ts +0 -316
- package/src/data-structures/priority-queue/index.ts +0 -3
- package/src/data-structures/priority-queue/max-priority-queue.ts +0 -56
- package/src/data-structures/priority-queue/min-priority-queue.ts +0 -57
- package/src/data-structures/priority-queue/priority-queue.ts +0 -359
- package/src/data-structures/queue/deque.ts +0 -297
- package/src/data-structures/queue/index.ts +0 -2
- package/src/data-structures/queue/queue.ts +0 -191
- package/src/data-structures/stack/index.ts +0 -1
- package/src/data-structures/stack/stack.ts +0 -98
- package/src/data-structures/tree/index.ts +0 -1
- package/src/data-structures/tree/tree.ts +0 -69
- package/src/data-structures/trie/index.ts +0 -1
- package/src/data-structures/trie/trie.ts +0 -225
- package/src/index.ts +0 -4
- package/src/interfaces/abstract-binary-tree.ts +0 -189
- package/src/interfaces/abstract-graph.ts +0 -31
- package/src/interfaces/avl-tree.ts +0 -25
- package/src/interfaces/binary-tree.ts +0 -6
- package/src/interfaces/bst.ts +0 -31
- package/src/interfaces/directed-graph.ts +0 -20
- package/src/interfaces/doubly-linked-list.ts +0 -1
- package/src/interfaces/heap.ts +0 -1
- package/src/interfaces/index.ts +0 -15
- package/src/interfaces/navigator.ts +0 -1
- package/src/interfaces/priority-queue.ts +0 -1
- package/src/interfaces/rb-tree.ts +0 -9
- package/src/interfaces/segment-tree.ts +0 -1
- package/src/interfaces/singly-linked-list.ts +0 -1
- package/src/interfaces/tree-multiset.ts +0 -7
- package/src/interfaces/undirected-graph.ts +0 -6
- package/src/types/data-structures/abstract-binary-tree.ts +0 -50
- package/src/types/data-structures/abstract-graph.ts +0 -11
- package/src/types/data-structures/avl-tree.ts +0 -5
- package/src/types/data-structures/binary-tree.ts +0 -5
- package/src/types/data-structures/bst.ts +0 -13
- package/src/types/data-structures/directed-graph.ts +0 -8
- package/src/types/data-structures/doubly-linked-list.ts +0 -1
- package/src/types/data-structures/hash.ts +0 -1
- package/src/types/data-structures/heap.ts +0 -5
- package/src/types/data-structures/index.ts +0 -16
- package/src/types/data-structures/map-graph.ts +0 -1
- package/src/types/data-structures/navigator.ts +0 -13
- package/src/types/data-structures/priority-queue.ts +0 -9
- package/src/types/data-structures/rb-tree.ts +0 -8
- package/src/types/data-structures/segment-tree.ts +0 -1
- package/src/types/data-structures/singly-linked-list.ts +0 -1
- package/src/types/data-structures/tree-multiset.ts +0 -6
- package/src/types/helpers.ts +0 -1
- package/src/types/index.ts +0 -3
- package/src/types/utils/index.ts +0 -2
- package/src/types/utils/utils.ts +0 -6
- package/src/types/utils/validate-type.ts +0 -35
- package/src/utils/index.ts +0 -1
- package/src/utils/utils.ts +0 -79
- package/test/integration/avl-tree.test.ts +0 -108
- package/test/integration/bst.test.ts +0 -380
- package/test/integration/heap.test.js +0 -16
- package/test/integration/index.html +0 -44
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +0 -108
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +0 -142
- package/test/unit/data-structures/binary-tree/bst.test.ts +0 -380
- package/test/unit/data-structures/binary-tree/overall.test.ts +0 -65
- package/test/unit/data-structures/binary-tree/rb-tree.test.ts +0 -43
- package/test/unit/data-structures/binary-tree/segment-tree.test.ts +0 -50
- package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +0 -461
- package/test/unit/data-structures/graph/abstract-graph.test.ts +0 -5
- package/test/unit/data-structures/graph/directed-graph.test.ts +0 -519
- package/test/unit/data-structures/graph/index.ts +0 -2
- package/test/unit/data-structures/graph/map-graph.test.ts +0 -45
- package/test/unit/data-structures/graph/overall.test.ts +0 -49
- package/test/unit/data-structures/graph/undirected-graph.test.ts +0 -59
- package/test/unit/data-structures/hash/coordinate-map.test.ts +0 -54
- package/test/unit/data-structures/hash/coordinate-set.test.ts +0 -41
- package/test/unit/data-structures/hash/hash-map.test.ts +0 -104
- package/test/unit/data-structures/hash/hash-table.test.ts +0 -184
- package/test/unit/data-structures/heap/heap.test.ts +0 -55
- package/test/unit/data-structures/heap/max-heap.test.ts +0 -44
- package/test/unit/data-structures/heap/min-heap.test.ts +0 -82
- package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +0 -364
- package/test/unit/data-structures/linked-list/index.ts +0 -4
- package/test/unit/data-structures/linked-list/linked-list.test.ts +0 -35
- package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +0 -451
- package/test/unit/data-structures/linked-list/skip-linked-list.test.ts +0 -13
- package/test/unit/data-structures/linked-list/skip-list.test.ts +0 -55
- package/test/unit/data-structures/matrix/matrix.test.ts +0 -54
- package/test/unit/data-structures/matrix/matrix2d.test.ts +0 -138
- package/test/unit/data-structures/matrix/navigator.test.ts +0 -79
- package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +0 -106
- package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +0 -105
- package/test/unit/data-structures/priority-queue/priority-queue.test.ts +0 -27
- package/test/unit/data-structures/queue/deque.test.ts +0 -130
- package/test/unit/data-structures/queue/queue.test.ts +0 -199
- package/test/unit/data-structures/stack/stack.test.ts +0 -67
- package/test/unit/data-structures/tree/tree.test.ts +0 -39
- package/test/unit/data-structures/trie/trie.test.ts +0 -95
- package/test/utils/index.ts +0 -2
- package/test/utils/magnitude.ts +0 -21
- package/test/utils/number.ts +0 -3
- package/tsconfig.json +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.33.
|
|
11
|
+
## [v1.33.9](https://github.com/zrwusa/data-structure-typed/compare/v1.33.4...main) (upcoming)
|
|
12
12
|
|
|
13
13
|
## [v1.33.4](https://github.com/zrwusa/data-structure-typed/compare/v1.33.3...v1.33.4) (26 September 2023)
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -2,17 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Data Structures of Javascript & TypeScript.
|
|
4
4
|
|
|
5
|
-
Do you envy
|
|
5
|
+
Do you envy C++ with [std](), Python with [collections](), and Java with [java.util]() ? Well, no need to envy anymore! JavaScript and TypeScript now have [data-structure-typed]().
|
|
6
6
|
|
|
7
7
|
Now you can use this library in Node.js and browser environments in CommonJS(require export.modules = ), ESModule(import export), Typescript(import export), UMD(var Queue = dataStructureTyped.Queue)
|
|
8
8
|
|
|
9
|
+
The size after packaging is 69 kB.
|
|
10
|
+
|
|
9
11
|

|
|
10
12
|

|
|
11
13
|

|
|
12
|
-

|
|
13
14
|

|
|
14
15
|

|
|
15
16
|
|
|
17
|
+
[//]: # ()
|
|
18
|
+
|
|
19
|
+
[//]: # ()
|
|
20
|
+
|
|
21
|
+
[//]: # ()
|
|
22
|
+
|
|
23
|
+
[//]: # ()
|
|
24
|
+
|
|
25
|
+
|
|
16
26
|
## Built-in classic algorithms
|
|
17
27
|
|
|
18
28
|
DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search), morris, Bellman-Ford Algorithm, Dijkstra's Algorithm,
|
|
@@ -23,7 +33,7 @@ Floyd-Warshall Algorithm, Tarjan's Algorithm.
|
|
|
23
33
|
### npm
|
|
24
34
|
|
|
25
35
|
```bash
|
|
26
|
-
npm i data-structure-typed
|
|
36
|
+
npm i data-structure-typed
|
|
27
37
|
```
|
|
28
38
|
|
|
29
39
|
### yarn
|
|
@@ -32,6 +42,14 @@ npm i data-structure-typed --save
|
|
|
32
42
|
yarn add data-structure-typed
|
|
33
43
|
```
|
|
34
44
|
|
|
45
|
+
```js
|
|
46
|
+
import {
|
|
47
|
+
BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList,
|
|
48
|
+
AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset,
|
|
49
|
+
DirectedVertex, AVLTreeNode
|
|
50
|
+
} from 'data-structure-typed';
|
|
51
|
+
```
|
|
52
|
+
|
|
35
53
|
### CDN
|
|
36
54
|
|
|
37
55
|
```html
|
|
@@ -40,18 +58,11 @@ yarn add data-structure-typed
|
|
|
40
58
|
```
|
|
41
59
|
|
|
42
60
|
```js
|
|
43
|
-
const {
|
|
61
|
+
const {Heap} = dataStructureTyped;
|
|
44
62
|
const {
|
|
45
|
-
|
|
46
|
-
MinHeap,
|
|
47
|
-
|
|
48
|
-
Stack,
|
|
49
|
-
AVLTreeNode,
|
|
50
|
-
BST,
|
|
51
|
-
Trie,
|
|
52
|
-
DirectedGraph,
|
|
53
|
-
DirectedVertex,
|
|
54
|
-
TreeMultiset
|
|
63
|
+
BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList,
|
|
64
|
+
AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset,
|
|
65
|
+
DirectedVertex, AVLTreeNode
|
|
55
66
|
} = dataStructureTyped;
|
|
56
67
|
```
|
|
57
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-structure-typed",
|
|
3
|
-
"version": "1.33.
|
|
3
|
+
"version": "1.33.9",
|
|
4
4
|
"description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"fix": "npm run fix:src && npm run fix:test",
|
|
25
25
|
"update:test-deps": "npm i avl-tree-typed binary-tree-typed bst-typed deque-typed directed-graph-typed doubly-linked-list-typed graph-typed heap-typed linked-list-typed max-heap-typed max-priority-queue-typed min-heap-typed min-priority-queue-typed priority-queue-typed singly-linked-list-typed stack-typed tree-multiset-typed trie-typed undirected-graph-typed queue-typed --save-dev",
|
|
26
26
|
"test": "jest",
|
|
27
|
-
"deps
|
|
27
|
+
"check:deps": "dependency-cruiser src",
|
|
28
28
|
"changelog": "auto-changelog",
|
|
29
29
|
"coverage:badge": "istanbul-badges-readme",
|
|
30
30
|
"ci": "env && npm run lint && npm run build && npm run test && git fetch --tags && npm run changelog"
|
|
@@ -49,40 +49,40 @@
|
|
|
49
49
|
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
50
50
|
"@typescript-eslint/parser": "^5.11.0",
|
|
51
51
|
"auto-changelog": "^2.4.0",
|
|
52
|
-
"avl-tree-typed": "^1.
|
|
52
|
+
"avl-tree-typed": "^1.33.7",
|
|
53
53
|
"benchmark": "^2.1.4",
|
|
54
|
-
"binary-tree-typed": "^1.
|
|
55
|
-
"bst-typed": "^1.
|
|
54
|
+
"binary-tree-typed": "^1.33.7",
|
|
55
|
+
"bst-typed": "^1.33.7",
|
|
56
56
|
"dependency-cruiser": "^13.1.2",
|
|
57
|
-
"deque-typed": "^1.
|
|
58
|
-
"directed-graph-typed": "^1.
|
|
59
|
-
"doubly-linked-list-typed": "^1.
|
|
57
|
+
"deque-typed": "^1.33.7",
|
|
58
|
+
"directed-graph-typed": "^1.33.7",
|
|
59
|
+
"doubly-linked-list-typed": "^1.33.7",
|
|
60
60
|
"eslint": "^7.32.0",
|
|
61
61
|
"eslint-config-prettier": "^8.3.0",
|
|
62
62
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
63
63
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
64
64
|
"eslint-plugin-import": "^2.25.4",
|
|
65
|
-
"graph-typed": "^1.
|
|
66
|
-
"heap-typed": "^1.
|
|
65
|
+
"graph-typed": "^1.33.7",
|
|
66
|
+
"heap-typed": "^1.33.7",
|
|
67
67
|
"istanbul-badges-readme": "^1.8.5",
|
|
68
68
|
"jest": "^29.6.2",
|
|
69
|
-
"linked-list-typed": "^1.
|
|
70
|
-
"max-heap-typed": "^1.
|
|
71
|
-
"max-priority-queue-typed": "^1.
|
|
72
|
-
"min-heap-typed": "^1.
|
|
73
|
-
"min-priority-queue-typed": "^1.
|
|
69
|
+
"linked-list-typed": "^1.33.7",
|
|
70
|
+
"max-heap-typed": "^1.33.7",
|
|
71
|
+
"max-priority-queue-typed": "^1.33.7",
|
|
72
|
+
"min-heap-typed": "^1.33.7",
|
|
73
|
+
"min-priority-queue-typed": "^1.33.7",
|
|
74
74
|
"prettier": "^3.0.3",
|
|
75
|
-
"priority-queue-typed": "^1.
|
|
76
|
-
"queue-typed": "^1.
|
|
77
|
-
"singly-linked-list-typed": "^1.
|
|
78
|
-
"stack-typed": "^1.
|
|
79
|
-
"tree-multiset-typed": "^1.
|
|
80
|
-
"trie-typed": "^1.
|
|
75
|
+
"priority-queue-typed": "^1.33.7",
|
|
76
|
+
"queue-typed": "^1.33.7",
|
|
77
|
+
"singly-linked-list-typed": "^1.33.7",
|
|
78
|
+
"stack-typed": "^1.33.7",
|
|
79
|
+
"tree-multiset-typed": "^1.33.7",
|
|
80
|
+
"trie-typed": "^1.33.7",
|
|
81
81
|
"ts-jest": "^29.1.1",
|
|
82
82
|
"ts-loader": "^9.4.4",
|
|
83
83
|
"typedoc": "^0.24.8",
|
|
84
84
|
"typescript": "^4.9.5",
|
|
85
|
-
"undirected-graph-typed": "^1.
|
|
85
|
+
"undirected-graph-typed": "^1.33.7",
|
|
86
86
|
"webpack": "^5.88.2",
|
|
87
87
|
"webpack-cli": "^5.1.4"
|
|
88
88
|
},
|
package/.prettierrc.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
"arrowParens": "avoid",
|
|
3
|
-
"bracketSpacing": false,
|
|
4
|
-
"htmlWhitespaceSensitivity": "css",
|
|
5
|
-
"insertPragma": false,
|
|
6
|
-
"bracketSameLine": false,
|
|
7
|
-
"jsxSingleQuote": true,
|
|
8
|
-
"printWidth": 120,
|
|
9
|
-
"proseWrap": "preserve",
|
|
10
|
-
"quoteProps": "as-needed",
|
|
11
|
-
"requirePragma": false,
|
|
12
|
-
"singleQuote": true,
|
|
13
|
-
"tabWidth": 2,
|
|
14
|
-
"trailingComma": "none",
|
|
15
|
-
"useTabs": false
|
|
16
|
-
}
|