data-structure-typed 2.2.6 → 2.2.8
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/CONTRIBUTING.md +47 -1
- package/README.md +19 -8
- package/README_CN.md +119 -275
- package/benchmark/report.html +1 -1
- package/benchmark/report.json +20 -324
- package/dist/cjs/index.cjs +109 -107
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +109 -107
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +109 -107
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +109 -107
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/leetcode/avl-tree-counter.mjs +2957 -0
- package/dist/leetcode/avl-tree-multi-map.mjs +2889 -0
- package/dist/leetcode/avl-tree.mjs +2720 -0
- package/dist/leetcode/binary-tree.mjs +1594 -0
- package/dist/leetcode/bst.mjs +2398 -0
- package/dist/leetcode/deque.mjs +683 -0
- package/dist/leetcode/directed-graph.mjs +1733 -0
- package/dist/leetcode/doubly-linked-list.mjs +709 -0
- package/dist/leetcode/hash-map.mjs +493 -0
- package/dist/leetcode/heap.mjs +542 -0
- package/dist/leetcode/max-heap.mjs +375 -0
- package/dist/leetcode/max-priority-queue.mjs +383 -0
- package/dist/leetcode/min-heap.mjs +363 -0
- package/dist/leetcode/min-priority-queue.mjs +371 -0
- package/dist/leetcode/priority-queue.mjs +363 -0
- package/dist/leetcode/queue.mjs +943 -0
- package/dist/leetcode/red-black-tree.mjs +2765 -0
- package/dist/leetcode/singly-linked-list.mjs +754 -0
- package/dist/leetcode/stack.mjs +217 -0
- package/dist/leetcode/tree-counter.mjs +3039 -0
- package/dist/leetcode/tree-multi-map.mjs +2913 -0
- package/dist/leetcode/trie.mjs +413 -0
- package/dist/leetcode/undirected-graph.mjs +1650 -0
- package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +1 -1
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +2 -2
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +10 -10
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +22 -23
- package/dist/types/data-structures/binary-tree/bst.d.ts +11 -11
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +1 -1
- package/dist/types/data-structures/binary-tree/tree-counter.d.ts +1 -1
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +2 -2
- package/dist/umd/data-structure-typed.js +105 -103
- package/dist/umd/data-structure-typed.js.map +1 -1
- package/dist/umd/data-structure-typed.min.js +2 -2
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +48 -171
- package/src/data-structures/binary-tree/avl-tree-counter.ts +6 -6
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +13 -13
- package/src/data-structures/binary-tree/avl-tree.ts +15 -15
- package/src/data-structures/binary-tree/binary-tree.ts +53 -55
- package/src/data-structures/binary-tree/bst.ts +21 -22
- package/src/data-structures/binary-tree/red-black-tree.ts +3 -3
- package/src/data-structures/binary-tree/tree-counter.ts +4 -4
- package/src/data-structures/binary-tree/tree-multi-map.ts +13 -13
- package/test/performance/data-structures/binary-tree/red-black-tree.test.ts +1 -2
- package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +30 -30
- package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +46 -46
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +43 -43
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +151 -151
- package/test/unit/data-structures/binary-tree/bst.test.ts +99 -99
- package/test/unit/data-structures/binary-tree/overall.test.ts +20 -20
- package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +141 -141
- package/test/unit/data-structures/binary-tree/tree-counter.test.ts +37 -37
- package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +145 -145
- package/tsup.config.js +50 -21
- package/tsup.leetcode.config.js +1 -1
- package/tsup.umd.config.js +29 -0
- package/tsup.node.config.js +0 -83
package/tsup.node.config.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig([
|
|
4
|
-
// ESM (modern) - ES2022
|
|
5
|
-
{
|
|
6
|
-
entry: { index: "src/index.ts" },
|
|
7
|
-
format: ["esm"],
|
|
8
|
-
outDir: "dist/esm",
|
|
9
|
-
splitting: false,
|
|
10
|
-
sourcemap: true,
|
|
11
|
-
minify: false,
|
|
12
|
-
keepNames: true,
|
|
13
|
-
treeshake: true,
|
|
14
|
-
clean: true,
|
|
15
|
-
target: "es2022",
|
|
16
|
-
outExtension() {
|
|
17
|
-
return { js: ".mjs" };
|
|
18
|
-
},
|
|
19
|
-
esbuildOptions(options) {
|
|
20
|
-
options.drop = ['debugger', 'console']
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
// ESM (legacy) - ES2018
|
|
25
|
-
{
|
|
26
|
-
entry: { index: "src/index.ts" },
|
|
27
|
-
format: ["esm"],
|
|
28
|
-
outDir: "dist/esm-legacy",
|
|
29
|
-
splitting: false,
|
|
30
|
-
sourcemap: true,
|
|
31
|
-
minify: false,
|
|
32
|
-
keepNames: true,
|
|
33
|
-
treeshake: true,
|
|
34
|
-
clean: false,
|
|
35
|
-
target: "es2018",
|
|
36
|
-
outExtension() {
|
|
37
|
-
return { js: ".mjs" };
|
|
38
|
-
},
|
|
39
|
-
esbuildOptions(options) {
|
|
40
|
-
options.drop = ['debugger', 'console']
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
// CJS (modern) - ES2022
|
|
45
|
-
{
|
|
46
|
-
entry: { index: "src/index.ts" },
|
|
47
|
-
format: ["cjs"],
|
|
48
|
-
outDir: "dist/cjs",
|
|
49
|
-
splitting: false,
|
|
50
|
-
sourcemap: true,
|
|
51
|
-
minify: false,
|
|
52
|
-
keepNames: true,
|
|
53
|
-
treeshake: true,
|
|
54
|
-
clean: false,
|
|
55
|
-
target: "es2022",
|
|
56
|
-
outExtension() {
|
|
57
|
-
return { js: ".cjs" };
|
|
58
|
-
},
|
|
59
|
-
esbuildOptions(options) {
|
|
60
|
-
options.drop = ['debugger', 'console']
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
// CJS (legacy) - ES2018
|
|
65
|
-
{
|
|
66
|
-
entry: { index: "src/index.ts" },
|
|
67
|
-
format: ["cjs"],
|
|
68
|
-
outDir: "dist/cjs-legacy",
|
|
69
|
-
splitting: false,
|
|
70
|
-
sourcemap: true,
|
|
71
|
-
minify: false,
|
|
72
|
-
keepNames: true,
|
|
73
|
-
treeshake: true,
|
|
74
|
-
clean: false,
|
|
75
|
-
target: "es2018",
|
|
76
|
-
outExtension() {
|
|
77
|
-
return { js: ".cjs" };
|
|
78
|
-
},
|
|
79
|
-
esbuildOptions(options) {
|
|
80
|
-
options.drop = ['debugger', 'console']
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]);
|