@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.mjs CHANGED
@@ -759,17 +759,16 @@ class Cache {
759
759
  if (this.options.storage) {
760
760
  if (this.options.storage instanceof Table) {
761
761
  if (key == null) {
762
- const rows = this.entries();
762
+ let rows = this.entries();
763
763
  rows.forEach(([k, v]) => {
764
764
  var _a;
765
765
  return (_a = this.options.storage) == null ? void 0 : _a.put(k, v);
766
766
  });
767
- this.options.storage.getAllKeys().then((keys) => {
768
- rows.map(([k]) => k).filter((k) => !keys.includes(k)).forEach((k) => {
769
- var _a;
770
- return (_a = this.options.storage) == null ? void 0 : _a.delete(k);
771
- });
772
- });
767
+ rows = rows.map(([k]) => k);
768
+ this.options.storage.getAllKeys().then((keys) => keys.filter((k) => !rows.includes(k)).forEach((k) => {
769
+ var _a;
770
+ return (_a = this.options.storage) == null ? void 0 : _a.delete(k);
771
+ }));
773
772
  } else if (this.store[key] === void 0) this.options.storage.delete(key);
774
773
  else this.options.storage.put(key, this.store[key]);
775
774
  } else if (this.options.storageKey) {