@ztimson/utils 0.25.24 → 0.25.25

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/dist/index.cjs CHANGED
@@ -763,17 +763,16 @@ ${opts.message || this.desc}`;
763
763
  if (this.options.storage) {
764
764
  if (this.options.storage instanceof Table) {
765
765
  if (key == null) {
766
- const rows = this.entries();
766
+ let rows = this.entries();
767
767
  rows.forEach(([k, v]) => {
768
768
  var _a;
769
769
  return (_a = this.options.storage) == null ? void 0 : _a.put(k, v);
770
770
  });
771
- this.options.storage.getAllKeys().then((keys) => {
772
- rows.map(([k]) => k).filter((k) => !keys.includes(k)).forEach((k) => {
773
- var _a;
774
- return (_a = this.options.storage) == null ? void 0 : _a.delete(k);
775
- });
776
- });
771
+ rows = rows.map(([k]) => k);
772
+ this.options.storage.getAllKeys().then((keys) => keys.filter((k) => !rows.includes(k)).forEach((k) => {
773
+ var _a;
774
+ return (_a = this.options.storage) == null ? void 0 : _a.delete(k);
775
+ }));
777
776
  } else if (this.store[key] === void 0) this.options.storage.delete(key);
778
777
  else this.options.storage.put(key, this.store[key]);
779
778
  } else if (this.options.storageKey) {