@blackglory/structures 0.6.0 → 0.6.1

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.
@@ -7558,6 +7558,24 @@ class TrieMap {
7558
7558
  get [Symbol.toStringTag]() {
7559
7559
  return this.constructor.name;
7560
7560
  }
7561
+ *entries() {
7562
+ yield* dfs(this.root, []);
7563
+ function* dfs(node, paths) {
7564
+ for (const [path, childNode] of node.children) {
7565
+ const newPaths = [...paths, path];
7566
+ if (es2018$2.isntUndefined(childNode.value)) {
7567
+ yield [newPaths, childNode.value];
7568
+ }
7569
+ yield* dfs(childNode, newPaths);
7570
+ }
7571
+ }
7572
+ }
7573
+ keys() {
7574
+ return es2018$4.map(this.entries(), ([key]) => key);
7575
+ }
7576
+ values() {
7577
+ return es2018$4.map(this.entries(), ([_, value]) => value);
7578
+ }
7561
7579
  set(key, value) {
7562
7580
  let node = this.root;
7563
7581
  for (const part of key) {