tree-multimap-typed 2.4.1 → 2.4.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.
|
@@ -14252,20 +14252,17 @@ var treeMultimapTyped = (() => {
|
|
|
14252
14252
|
prefix = this._caseProcess(prefix);
|
|
14253
14253
|
const words = [];
|
|
14254
14254
|
let found = 0;
|
|
14255
|
-
|
|
14256
|
-
for (const char of node.children
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
dfs(charNode, word.concat(char));
|
|
14260
|
-
}
|
|
14255
|
+
const dfs = /* @__PURE__ */ __name((node, word) => {
|
|
14256
|
+
for (const [char, childNode] of node.children) {
|
|
14257
|
+
if (found >= max) return;
|
|
14258
|
+
dfs(childNode, word + char);
|
|
14261
14259
|
}
|
|
14262
14260
|
if (node.isEnd) {
|
|
14263
|
-
if (found
|
|
14261
|
+
if (found >= max) return;
|
|
14264
14262
|
words.push(word);
|
|
14265
14263
|
found++;
|
|
14266
14264
|
}
|
|
14267
|
-
}
|
|
14268
|
-
__name(dfs, "dfs");
|
|
14265
|
+
}, "dfs");
|
|
14269
14266
|
let startNode = this.root;
|
|
14270
14267
|
if (prefix) {
|
|
14271
14268
|
for (const c of prefix) {
|