@graphql-mesh/cache-inmemory-lru 0.0.3 → 0.0.4

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/cjs/index.js CHANGED
@@ -34,7 +34,13 @@ class InMemoryLRUCache {
34
34
  }
35
35
  }
36
36
  getKeysByPrefix(prefix) {
37
- return Array.from(this.lru.keys()).filter(key => key.startsWith(prefix));
37
+ const keysWithPrefix = [];
38
+ for (const key of this.lru.keys()) {
39
+ if (key.startsWith(prefix)) {
40
+ keysWithPrefix.push(key);
41
+ }
42
+ }
43
+ return keysWithPrefix;
38
44
  }
39
45
  [disposablestack_1.DisposableSymbols.dispose]() {
40
46
  for (const timeout of this.timeouts) {
package/esm/index.js CHANGED
@@ -32,7 +32,13 @@ export default class InMemoryLRUCache {
32
32
  }
33
33
  }
34
34
  getKeysByPrefix(prefix) {
35
- return Array.from(this.lru.keys()).filter(key => key.startsWith(prefix));
35
+ const keysWithPrefix = [];
36
+ for (const key of this.lru.keys()) {
37
+ if (key.startsWith(prefix)) {
38
+ keysWithPrefix.push(key);
39
+ }
40
+ }
41
+ return keysWithPrefix;
36
42
  }
37
43
  [DisposableSymbols.dispose]() {
38
44
  for (const timeout of this.timeouts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/cache-inmemory-lru",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"