{"_id":"quick-lru","_rev":"4577293","name":"quick-lru","description":"Simple “Least Recently Used” (LRU) cache","dist-tags":{"latest":"7.3.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-04-10T15:47:03.000Z","created":"2017-03-30T08:59:02.872Z","7.3.0":"2025-10-10T07:56:05.121Z","7.2.0":"2025-09-16T22:19:05.897Z","7.1.0":"2025-08-20T16:03:37.328Z","7.0.1":"2025-04-09T09:28:52.343Z","7.0.0":"2023-09-11T09:13:22.504Z","6.1.2":"2023-08-27T21:23:26.991Z","6.1.1":"2022-03-26T15:19:07.150Z","6.1.0":"2022-02-18T15:31:25.026Z","6.0.2":"2021-11-21T07:09:11.437Z","6.0.1":"2021-08-09T17:06:34.520Z","6.0.0":"2021-01-14T08:17:14.266Z","5.1.1":"2020-06-01T13:11:30.055Z","5.1.0":"2020-04-06T07:57:10.191Z","5.0.0":"2020-02-13T13:17:38.014Z","4.0.1":"2019-05-29T17:21:30.565Z","4.0.0":"2019-04-05T07:16:59.556Z","3.0.0":"2019-03-10T13:41:22.484Z","2.0.0":"2018-11-11T17:21:14.144Z","1.1.0":"2017-07-27T13:45:39.693Z","1.0.0":"2017-03-30T08:59:02.872Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"versions":{"7.3.0":{"name":"quick-lru","version":"7.3.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^5.3.1","nyc":"^15.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"nyc":{"reporter":["text","lcov"]},"gitHead":"070bdf331d9e451f75f5335c127255a124d4270d","types":"./index.d.ts","_id":"quick-lru@7.3.0","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_nodeVersion":"20.19.5","_npmVersion":"11.6.1","dist":{"shasum":"2af7e0fc72b66b7496251f6226cc723662c50665","size":6119,"noattachment":false,"key":"/quick-lru/-/quick-lru-7.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-7.3.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quick-lru_7.3.0_1760082964933_0.3331962167082485"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-10T07:56:05.121Z","publish_time":1760082965121,"_source_registry_name":"default","_cnpm_publish_time":1760082965121},"7.2.0":{"name":"quick-lru","version":"7.2.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^5.3.1","nyc":"^15.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"nyc":{"reporter":["text","lcov"]},"_id":"quick-lru@7.2.0","gitHead":"02786037f0662a5d97a544020aa4fbbc429990e8","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_nodeVersion":"20.19.5","_npmVersion":"10.9.2","dist":{"shasum":"242ef4b936afb0c2455e97962958d19c7e7cb11d","size":6086,"noattachment":false,"key":"/quick-lru/-/quick-lru-7.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-7.2.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quick-lru_7.2.0_1758061145665_0.6742163866471944"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-16T22:19:05.897Z","publish_time":1758061145897,"_source_registry_name":"default","_cnpm_publish_time":1758061145897},"7.1.0":{"name":"quick-lru","version":"7.1.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^5.3.1","nyc":"^15.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"nyc":{"reporter":["text","lcov"]},"_id":"quick-lru@7.1.0","gitHead":"1ad492a192b80256709691434b95a179d1e5c48e","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"shasum":"79646ebd1502ec39e4bd9c246b6128280d9d0cf0","size":4964,"noattachment":false,"key":"/quick-lru/-/quick-lru-7.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-7.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quick-lru_7.1.0_1755705817078_0.008228599237979362"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-20T16:03:37.328Z","publish_time":1755705817328,"_source_registry_name":"default","_cnpm_publish_time":1755705817328},"7.0.1":{"name":"quick-lru","version":"7.0.1","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^5.3.1","nyc":"^15.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"nyc":{"reporter":["text","lcov"]},"_id":"quick-lru@7.0.1","gitHead":"7d6aabb1f92cc12d67f848c5fa4bb1eae30c46a1","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_nodeVersion":"23.6.1","_npmVersion":"10.9.2","dist":{"shasum":"6df758a00721b9d619769b1b34689e65bea28c7e","size":4667,"noattachment":false,"key":"/quick-lru/-/quick-lru-7.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-7.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quick-lru_7.0.1_1744190932138_0.66740914119224"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-04-09T09:28:52.343Z","publish_time":1744190932343,"_source_registry_name":"default","_cnpm_publish_time":1744190932343},"7.0.0":{"name":"quick-lru","version":"7.0.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^5.3.1","nyc":"^15.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"nyc":{"reporter":["text","lcov"]},"types":"./index.d.ts","gitHead":"6862e8ecab576618c44fe0cb26e9fa921c85a884","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@7.0.0","_nodeVersion":"18.16.1","_npmVersion":"9.2.0","dist":{"shasum":"447f6925b33ae4d2d637e211967d74bae4b99c3f","size":4619,"noattachment":false,"key":"/quick-lru/-/quick-lru-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_7.0.0_1694423602313_0.4835452465221286"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-11T09:13:22.504Z","publish_time":1694423602504,"_source_registry_name":"default","_cnpm_publish_time":1694423602504},"6.1.2":{"name":"quick-lru","version":"6.1.2","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"types":"./index.d.ts","gitHead":"b552634391f442540ccec95646d26df03529eb05","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.1.2","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"shasum":"e9a90524108629be35287d0b864e7ad6ceb3659e","size":4775,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.1.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.1.2_1693171406730_0.2538378381410218"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-27T21:23:26.991Z","publish_time":1693171406991,"_source_registry_name":"default","_cnpm_publish_time":1693171406991},"6.1.1":{"name":"quick-lru","version":"6.1.1","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"types":"./index.d.ts","gitHead":"771392878fc0e2325b1172d04260e87afe94c8f7","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.1.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.2","dist":{"shasum":"f8e5bf9010376c126c80c1a62827a526c0e60adf","size":4774,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.1.1_1648307946784_0.9757007166465537"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-26T15:19:10.840Z","publish_time":1648307947150,"_cnpm_publish_time":1648307947150},"6.1.0":{"name":"quick-lru","version":"6.1.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"types":"./index.d.ts","gitHead":"b93929f39c93598d8832f37eddcfc11ea0d66c8b","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.1.0","_nodeVersion":"17.5.0","_npmVersion":"8.3.2","dist":{"shasum":"2a431d0cf85f55482d314647e4e9d93b21cbc8a9","size":4772,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.1.0_1645198284884_0.8799832205764686"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-02-18T15:31:29.243Z","publish_time":1645198285026,"_cnpm_publish_time":1645198285026},"6.0.2":{"name":"quick-lru","version":"6.0.2","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"types":"./index.d.ts","gitHead":"cf1bbcf9a92cb972b5b4684a67b516c0c1a668fc","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.0.2","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"3282ffba92717532e8c9c6aea9537a7f0859164b","size":4563,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.0.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.0.2_1637478551246_0.10431457352718732"},"_hasShrinkwrap":false,"publish_time":1637478551437,"_cnpm_publish_time":1637478551437},"6.0.1":{"name":"quick-lru","version":"6.0.1","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"gitHead":"6ee4b6e9a7391f4536324ea1df909839d5d2734d","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.0.1","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"3a3fabc74960d663222d04957634766d3447c562","size":4548,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.0.1_1628528794361_0.06180127485580211"},"_hasShrinkwrap":false,"publish_time":1628528794520,"_cnpm_publish_time":1628528794520},"6.0.0":{"name":"quick-lru","version":"6.0.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"//test":"xo && nyc ava && tsd","test":"xo && ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"nyc":{"reporter":["text","lcov"]},"gitHead":"1a51a3eb9e32f14357cef3d3ccbf38d08cda02d2","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@6.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c5a245a773c702694870828e5f09b28f7af087db","size":4571,"noattachment":false,"key":"/quick-lru/-/quick-lru-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-6.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_6.0.0_1610612233916_0.5484875996721288"},"_hasShrinkwrap":false,"publish_time":1610612234266,"_cnpm_publish_time":1610612234266},"5.1.1":{"name":"quick-lru","version":"5.1.1","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^2.0.0","coveralls":"^3.0.3","nyc":"^15.0.0","tsd":"^0.11.0","xo":"^0.26.0"},"gitHead":"64915f7a4ce7c0cf7aec1cc6320c050f1c4bddd1","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@5.1.1","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"366493e6b3e42a3a6885e2e99d18f80fb7a8c932","size":3387,"noattachment":false,"key":"/quick-lru/-/quick-lru-5.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-5.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_5.1.1_1591017089902_0.4589325163276523"},"_hasShrinkwrap":false,"publish_time":1591017090055,"_cnpm_publish_time":1591017090055},"5.1.0":{"name":"quick-lru","version":"5.1.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^2.0.0","coveralls":"^3.0.3","nyc":"^15.0.0","tsd":"^0.11.0","xo":"^0.26.0"},"gitHead":"c205876c128de9b34be24ef5189c3194bcbcee23","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@5.1.0","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1602f339bde554c4dace47880227ec9c2869f2e8","size":3385,"noattachment":false,"key":"/quick-lru/-/quick-lru-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-5.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_5.1.0_1586159830047_0.5906710401908553"},"_hasShrinkwrap":false,"publish_time":1586159830191,"_cnpm_publish_time":1586159830191},"5.0.0":{"name":"quick-lru","version":"5.0.0","description":"Simple “Least Recently Used” (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^2.0.0","coveralls":"^3.0.3","nyc":"^15.0.0","tsd":"^0.11.0","xo":"^0.26.0"},"gitHead":"b0feed4ec77456836cc2c6934801fe29f69d2b7f","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@5.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a2b007dd2335408a2348735bfc3aa42af605d37e","size":3191,"noattachment":false,"key":"/quick-lru/-/quick-lru-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_5.0.0_1581599857888_0.43905769021974583"},"_hasShrinkwrap":false,"publish_time":1581599858014,"_cnpm_publish_time":1581599858014},"4.0.1":{"name":"quick-lru","version":"4.0.1","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^1.4.1","coveralls":"^3.0.3","nyc":"^14.1.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"64c21e6e8898d2f2751357c422ae53c63ac66aff","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@4.0.1","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5b8878f113a58217848c6482026c73e1ba57727f","size":2925,"noattachment":false,"key":"/quick-lru/-/quick-lru-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-4.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_4.0.1_1559150490405_0.9876888152612853"},"_hasShrinkwrap":false,"publish_time":1559150490565,"_cnpm_publish_time":1559150490565},"4.0.0":{"name":"quick-lru","version":"4.0.0","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^1.4.1","coveralls":"^3.0.3","nyc":"^13.3.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"4e484ef5202ffc07977cd4ae771ceb6fa253ff61","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@4.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a44d44010a776d787af65b1226566dd1ae7b9649","size":2953,"noattachment":false,"key":"/quick-lru/-/quick-lru-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_4.0.0_1554448619367_0.9515006929966581"},"_hasShrinkwrap":false,"publish_time":1554448619556,"_cnpm_publish_time":1554448619556},"3.0.0":{"name":"quick-lru","version":"3.0.0","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && nyc ava && tsd-check"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^1.3.1","coveralls":"^3.0.1","nyc":"^13.1.0","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"c206b5c8e9d6eddba8188a3e741c3a7eb521eea5","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@3.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"2f96145481567e5bc442c6c4a66e86158405c696","size":2918,"noattachment":false,"key":"/quick-lru/-/quick-lru-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_3.0.0_1552225282235_0.7626934676744992"},"_hasShrinkwrap":false,"publish_time":1552225282484,"_cnpm_publish_time":1552225282484},"2.0.0":{"name":"quick-lru","version":"2.0.0","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && nyc ava"},"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"^0.25.0","coveralls":"^3.0.1","nyc":"^13.1.0","xo":"^0.23.0"},"gitHead":"01f18dde7ffba7991906c96adaff3bdf1dc76e5a","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"32b017b28d1784631c8ab0a1ed2978e094dbe181","size":2561,"noattachment":false,"key":"/quick-lru/-/quick-lru-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru_2.0.0_1541956873962_0.3470425557929264"},"_hasShrinkwrap":false,"publish_time":1541956874144,"_cnpm_publish_time":1541956874144},"1.1.0":{"name":"quick-lru","version":"1.1.0","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"*","coveralls":"^2.12.0","nyc":"^11.0.3","xo":"*"},"gitHead":"618c5cdcc591289e58fc02c93830b2dc6162cdfa","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@1.1.0","_shasum":"4360b17c61136ad38078397ff11416e186dcfbb8","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4360b17c61136ad38078397ff11416e186dcfbb8","size":2529,"noattachment":false,"key":"/quick-lru/-/quick-lru-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quick-lru-1.1.0.tgz_1501163138777_0.7843833630904555"},"directories":{},"publish_time":1501163139693,"_cnpm_publish_time":1501163139693,"_hasShrinkwrap":false},"1.0.0":{"name":"quick-lru","version":"1.0.0","description":"Simple \"Least Recently Used\" (LRU) cache","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/quick-lru.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["lru","quick","cache","caching","least","recently","used","fast","map","hash","buffer"],"devDependencies":{"ava":"*","coveralls":"^2.12.0","nyc":"^10.2.0","xo":"*"},"gitHead":"2ea4c25ec7b5d4eacd37872c9313bdfae0f31d33","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"homepage":"https://github.com/sindresorhus/quick-lru#readme","_id":"quick-lru@1.0.0","_shasum":"7fa80304ab72c1f81cef738739cd47d7cc0c8bff","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7fa80304ab72c1f81cef738739cd47d7cc0c8bff","size":2500,"noattachment":false,"key":"/quick-lru/-/quick-lru-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-lru/download/quick-lru-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/quick-lru-1.0.0.tgz_1490864340991_0.10071378503926098"},"directories":{},"publish_time":1490864342872,"_hasShrinkwrap":false,"_cnpm_publish_time":1490864342872}},"readme":"# quick-lru [![Coverage Status](https://codecov.io/gh/sindresorhus/quick-lru/branch/main/graph/badge.svg)](https://codecov.io/gh/sindresorhus/quick-lru/branch/main)\n\n> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)\n\nUseful when you need to cache something and limit memory usage.\n\nSee the [algorithm section](#algorithm) for implementation details.\n\n## Install\n\n```sh\nnpm install quick-lru\n```\n\n## Usage\n\n```js\nimport QuickLRU from 'quick-lru';\n\nconst lru = new QuickLRU({maxSize: 1000});\n\nlru.set('????', '????');\n\nlru.has('????');\n//=> true\n\nlru.get('????');\n//=> '????'\n```\n\n## API\n\n### new QuickLRU(options?)\n\nReturns a new instance.\n\nIt's a [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) subclass.\n\n### options\n\nType: `object`\n\n#### maxSize\n\n*Required*\\\nType: `number`\n\nThe target maximum number of items before evicting the least recently used items.\n\n> [!NOTE]\n> This package uses an [algorithm](#algorithm) which maintains between `maxSize` and `2 × maxSize` items for performance reasons. The cache may temporarily contain up to twice the specified size due to the dual-cache design that avoids expensive delete operations.\n\n#### maxAge\n\nType: `number`\\\nDefault: `Infinity`\n\nThe maximum number of milliseconds an item should remain in the cache.\nBy default, `maxAge` will be `Infinity`, which means that items will never expire.\n\nLazy expiration occurs upon the next `write` or `read` call.\n\nIndividual expiration of an item can be specified by the `set(key, value, options)` method.\n\n#### onEviction\n\n*Optional*\\\nType: `(key, value) => void`\n\nCalled right before an item is evicted from the cache due to LRU pressure, TTL expiration, or manual eviction via `evict()`.\n\nUseful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).\n\n> [!NOTE]\n> This callback is **not** called for manual removals via `delete()` or `clear()`. It fires for automatic evictions and manual evictions via `evict()`.\n\n### Instance\n\nThe instance is an [`Iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) of `[key, value]` pairs so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.\n\nBoth `key` and `value` can be of any type.\n\n#### .set(key, value, options?)\n\nSet an item. Returns the instance.\n\nIndividual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor; otherwise, the item will never expire.\n\n#### .get(key)\n\nGet an item.\n\n#### .has(key)\n\nCheck if an item exists.\n\n#### .peek(key)\n\nGet an item without marking it as recently used.\n\n#### .delete(key)\n\nDelete an item.\n\nReturns `true` if the item is removed or `false` if the item doesn't exist.\n\n#### .clear()\n\nDelete all items.\n\n#### .expiresIn(key)\n\nGet the remaining time to live (in milliseconds) for the given item, or `undefined` if the item is not in the cache.\n\n- Does not mark the item as recently used.\n- Does not trigger lazy expiration or remove the entry when it’s expired.\n- Returns `Infinity` if the item has no expiration (`maxAge` not set for the item and no global `maxAge`).\n- May return a negative number if the item has already expired but has not yet been lazily removed.\n\n#### .resize(maxSize)\n\nUpdate the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.\n\nUseful for on-the-fly tuning of cache sizes in live systems.\n\n#### .evict(count?)\n\nEvict the least recently used items from the cache.\n\nThe `count` parameter specifies how many items to evict. Defaults to 1.\n\nIt will always keep at least one item in the cache.\n\n```js\nimport QuickLRU from 'quick-lru';\n\nconst lru = new QuickLRU({maxSize: 10});\n\nlru.set('a', 1);\nlru.set('b', 2);\nlru.set('c', 3);\n\nlru.evict(2); // Evicts 'a' and 'b'\n\nconsole.log(lru.has('a'));\n//=> false\n\nconsole.log(lru.has('c'));\n//=> true\n```\n\n#### .keys()\n\nIterable for all the keys.\n\n#### .values()\n\nIterable for all the values.\n\n#### .entriesAscending()\n\nIterable for all entries, starting with the oldest (ascending in recency).\n\n#### .entriesDescending()\n\nIterable for all entries, starting with the newest (descending in recency).\n\n#### .entries()\n\nIterable for all entries, starting with the oldest (ascending in recency).\n\n**This method exists for `Map` compatibility. Prefer [.entriesAscending()](#entriesascending) instead.**\n\n#### .forEach(callbackFunction, thisArgument)\n\nLoop over entries calling the `callbackFunction` for each entry (ascending in recency).\n\n**This method exists for `Map` compatibility. Prefer [.entriesAscending()](#entriesascending) instead.**\n\n#### .size *(getter)*\n\nThe stored item count.\n\n#### .maxSize *(getter)*\n\nThe set max size.\n\n#### .maxAge *(getter)*\n\nThe set max age.\n\n## Algorithm\n\nThis library implements a variant of the [hashlru algorithm](https://github.com/dominictarr/hashlru#algorithm) using JavaScript's `Map` for broader key type support.\n\n### How it works\n\nThe algorithm uses a dual-cache approach with two `Map` objects:\n\n1. New cache - Stores recently accessed items\n2. Old cache - Stores less recently accessed items\n\nOn `set()` operations:\n- If the key exists in the new cache, update it\n- Otherwise, add the key-value pair to the new cache\n- When the new cache reaches `maxSize`, promote it to become the old cache and create a fresh new cache\n\nOn `get()` operations:\n- If the key is in the new cache, return it directly\n- If the key is in the old cache, move it to the new cache (promoting its recency)\n\n### Benefits\n\n- Performance: Avoids expensive `delete` operations that can cause performance issues in JavaScript engines\n- Simplicity: No complex linked list management required\n- Cache efficiency: Maintains LRU semantics while being much faster than traditional implementations\n\n### Trade-offs\n\n- Size variance: The cache can contain between `maxSize` and `2 × maxSize` items temporarily\n- Memory overhead: Uses up to twice the target memory compared to strict LRU implementations\n\n### When to use\n\nChoose this implementation when:\n- You need high-performance caching with many operations\n- You can tolerate temporary size variance for better performance\n- You want simple, reliable caching without complex data structures\n\nConsider alternatives when:\n- You need strict memory limits (exactly `maxSize` items)\n- Memory usage is more critical than performance\n\n## Related\n\n- [yocto-queue](https://github.com/sindresorhus/yocto-queue) - Tiny queue data structure\n","_attachments":{},"homepage":"https://github.com/sindresorhus/quick-lru#readme","bugs":{"url":"https://github.com/sindresorhus/quick-lru/issues"},"license":"MIT"}