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