Lint match_collector
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
type ItemTree = {
|
||||
data: any
|
||||
data: number | undefined
|
||||
count: number
|
||||
children: Array<ItemTree>
|
||||
}
|
||||
@@ -73,13 +73,6 @@ function treeCutBranches(itemtree: ItemTree, thresholdCount: number, thresholdPe
|
||||
itemtree.children.map(x => treeCutBranches(x, thresholdCount, thresholdPerc))
|
||||
}
|
||||
|
||||
function treeMergeTree(itemtree1: ItemTree, itemtree2: ItemTree) {
|
||||
for (const child of itemtree2.children) {
|
||||
const node = nodeMerge(itemtree1, child)
|
||||
treeMergeTree(node, child)
|
||||
}
|
||||
}
|
||||
|
||||
function treeSort(itemtree: ItemTree) {
|
||||
itemtree.children.sort((a, b) => b.count - a.count)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user