{"_id":"toad-cache","_rev":"34-0b893c4b6f053b131171a9f81adeea41","name":"toad-cache","dist-tags":{"next":"3.3.1-RC7","latest":"3.7.0"},"versions":{"1.0.0-next1":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.0.0-next1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"02c6e6161b1d92cb5ca909f469a6f268dba3f1ae","_id":"toad-cache@1.0.0-next1","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-SbCfir53p6uhksZ5dBFVpoVEBME12TuSXxl9txOBaB13VuuKn3iSDwerCYu8M8fzLS3hsbOfOKzriytfhd4eqQ==","shasum":"6d0e08fb85d62469f3dcd127d90e32d77d4227d8","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.0.0-next1.tgz","fileCount":11,"unpackedSize":47720,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0x0goGwMluDxF5tm/rvTxubW18zV+UxiLb+kuFM36oQIhAOOT8ObY9Qao/WV9+79s9fGJd4yrlSWodivu8IS46ctb"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKbQxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmquag//Rm+aiMFPnjJgH2SI1wmZ5fnftbywwcu2qI8N5MNTzNmnwFHC\r\nUb96Jmlh6rahR/M7pEqyA46vLYTKe57NCJYnnvGd/X8TTTDao18wrldF8nN5\r\nghdTt3LxBbIN5OyN03iBwuaxNWZgiHXC0aoUw/QH7/m+vIZ8qgdZt43aX2/p\r\nOMfADPoCwKaHfEHiNJuBJUP1w5QY3gxkDVI2OP78mMbBcoXjradxcqpZvc+P\r\nm86pIMrgUzwwoSkTFys9rLIlg8g04lxGZC/ora2E4fY+UD3qEz8RLmq/2or4\r\nXaU59sxw8HpYSXjZP5zXPuR/AgDnQ7/h+2jvcVRGKCMTDyQKTIcYsDWjz+pN\r\nGOcAUWYEM6oZ6bymDj/LoifSQm7ifgIf9nZJuoVuWYSFR02yn/xDLrFXvUjx\r\nIPX/3++MpoAJhyhaCj/Pw8I8uaDuHKtsI50KYMECRGLDCGLop15vwGe9hoCx\r\nJbhPpQTZNnd6jnVGAmzecU0wEwtkmfvuKd0UjoGPqo9862FYRrM85CTmeOMC\r\nNBCevRLmL+d2RuDFHVxoiPej5vhsAGJwSpcyXdMebej+qhRU+8VhwPm5xcyI\r\nPgaj1YO2x1YnRMbV5wU7s+oUwjFqCEBXIr/JftGVlC/4xpGsin0PPgCYWmNP\r\nSe8qagoWhhoL9ZoOFEGSOm1K4QBCy57fTvM=\r\n=yFuj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.0.0-next1_1680454705289_0.31826010759525736"},"_hasShrinkwrap":false},"1.0.0-next2":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.0.0-next2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"02c6e6161b1d92cb5ca909f469a6f268dba3f1ae","_id":"toad-cache@1.0.0-next2","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-sYp99fp4UIvNBimnwapltfJRFwz42LxJQpccSHI9g0Z1Qh6uJKG8qvdE8FYKhWRRUsUuPBRjlTsf17kWmX13KA==","shasum":"950fe35bf4ebab6346e435163144aa556d663557","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.0.0-next2.tgz","fileCount":11,"unpackedSize":47708,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG08HuZM8aINvlmJnrMdhjXG9f6ktcuM/Cxzu8XF5sLJAiA6qvsqlhfqc7KCyBIY4/x4G/FYdm/3KWnOiq7VBN+DnA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKbUAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/VA/8CT2t522jmc6FrWzNMdpQBETFSVIMp1wWNfAuwIFw1zh+Cdrm\r\n/vHqKjjjSFOGsc7S5E5uElw+m1f97aZi0iDndc0LMYU6/0eXows3UkRvBUqz\r\nzaAn7Hw1d3qyTV3wN6MOpzgYog70hwkW6LH265U0viclQcBUzBB6peE9mxhh\r\nJOa7n5UzNxJ5jPcWUWn4CPkBSn/SuTo/nzLX03W7gw4DKG2VTe8/SjG6xI3X\r\nMi3YuWEhF3lL4DsTMxVBdUDBIZoSsq3DeEng2d6/mjrlm0x7xcdZqTayQfl0\r\n1CgAP6YR3lj3KCVVl+k+8VqlakODJPa92PdUGGAM7rw5GLO0tuTGX4tU9SJ8\r\nJLuZDtJapfga8SjSM3hMFe2Qjun5feiKhJAhLnEs9uiZ+S96HMd5rqV3UGZs\r\nEnpHBiiCZHjRkjM5qxia/OHYPCj8YnaRwjDrJaQRAW+i92ahqmsbja3Hro7Z\r\nVhS1qlqQtPBW92phc3ytvh1Kj2W1wCFz23uqKWrPeHFPJCIxAPCwMSbJ61/t\r\n7OzBzIFq+NezknpagVlAxtssGCfUY7RhvMDf8FYT7q31SiTuPLYPVzJFOmdD\r\nBUWD94X9pE2kue0dGFUi+Nqbyto6i/g8nwfJ9B6yKyCf2I9CK9myJ6TvD+nP\r\n3GPAj/753UlaMavoYOKRh0nvaGQdXT14vNA=\r\n=ylTW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.0.0-next2_1680454912092_0.6393609647028748"},"_hasShrinkwrap":false},"1.0.0-next3":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.0.0-next3","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"02c6e6161b1d92cb5ca909f469a6f268dba3f1ae","_id":"toad-cache@1.0.0-next3","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-6tINa8t1ZaBcCqUp6KMkE1clLZsmb/NPuxG9Zn2rdS+QCZlZz1HjcXxiIQQAunlxRnpp8ZgvozSWYSJqP2Gm4A==","shasum":"6d1c777dbebbc1090174f856af53b5df879835f7","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.0.0-next3.tgz","fileCount":11,"unpackedSize":47806,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAoTBn+pYn7gsKyrk+b931NyvUdmj1627ZoBnVhYRXEgIgJWOjPXW9E53sK9b6Rmwo5jFmUCfD1wr+PTSyvVJje/Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKbXOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+Qw//UR1TSKCyzyTaullRGxS5dpPEIejScUlwUYbRM2xvWtwjC+6j\r\nbQk1TJU8tDXKGL+gbgO9S/33pxsR+8Tipp3K1lYMxhYRldS7wlYBI4WmdD/q\r\n01Xlkx0Yu1otaFJF+Ojs/rFm++1pBQMWgnzAzFD6daM/rdKTt0GB3M8R4tUu\r\nd14AwkPck/fBEqw2nmoRvQ70XXdPCdUnIAl39HTqr6wHAgM24+qvHm3BTrMK\r\nAtGOc0lrIQxWfgz8ydeJma0w3X+T5MRl9jfl0XZrVKc09IhDCTEjutieCrvl\r\nhsOg2c3SFs8kxURa0tKRZQ4zVe4jz9u3HQdtwtVwTg8YsHMe5lkMJQF4cMP5\r\neaOmCXuyFrVfnZNFE4Xnk+91zaYHf0e/Cu/lC0vqeOm3lr8+X1PgJDnqNCHc\r\nAwYfXAZaVrymdrBjxB3yLosx4VUaUvlziMBxHv9tS1NrDj00gfoQ2ENOKoZ8\r\ncbkByRsJMnFUcDC0lPPHjZYQOz+UyHH//pceo+JGV97SD/C2UNPy1VToChFf\r\n0ffoxzYkIi15T0V3LP7SPizrR/BLJ+XwaJnxD6M7oJSaJTgIhG1x7fF7md+y\r\nF6kgY0BKTkVraF5MXP7MAWgZJyY+SqimCdIjklvslpg2pe88QXz9ZITCTpA0\r\nTspFVNK3qMGaF6VfCG0ik6EAOHteATsISEA=\r\n=Z5Rz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.0.0-next3_1680455118442_0.43752693062473136"},"_hasShrinkwrap":false},"1.0.0-next4851":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.0.0-next4851","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"02c6e6161b1d92cb5ca909f469a6f268dba3f1ae","_id":"toad-cache@1.0.0-next4851","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-GnVIMiCB0Xt/Ks2Vup245NFMkYzhg06c9mlepxnDlDan+s4tjf3h2FmesjyBF1tzJSS7IOaNNbLsuCtV05gwcw==","shasum":"e90bfaaccd79beb922ba1931e3536d1d6cad5302","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.0.0-next4851.tgz","fileCount":11,"unpackedSize":47824,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDN+VaOWL35okLqGDeZGB515V2XlVyZja5NSnIn7uSp0AiACUyJFo39ME1taR0/lMMHwNOhA5vzOO+KRYGWUKghGeQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKbcGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrImg//YcGUg2zxP/TN4Fry+n5O4tm/yHGIqXVq+MUOLTXp2XtF3W57\r\nCvn0NNecwgyHoAEUNQC1nblDrENSOwJBguIsfuNvTSickyZf4PfKd7bLkeU7\r\nW8t9oWDUbcFiHJ8vZb1rjgmQa58brUlJLZGsVC1BmpniRFCC6buOxmrlMLbn\r\nmDJuomk2WimiLei2/lsI2925k7ECHIbDD5VvAKHEKOto/F1+Rhdo9XgriA/G\r\nzgnqq/ntBDPrt22eGrG9J1whEBzKELujrWRn0xmcYcghyZDPq39obx1WXa3H\r\nWT6Z/E+UMJ7D45h5s+zYCIneWZh2ptWzImq3YBBgWqF76z8s63sC97UQzCh9\r\nReN5G/7rD4ur0KjmjQDVOvONIkJUWowESxnN8eOmotryUuj3TEv0CexTy/HX\r\nC64eS2IyoieZOAwf1K/+raOEb9UBFu1/wFAlkVhmiHth6Z5JFBllviHi6k7N\r\nkZ89XZ7YHtxs5Q+993fOz0ooWsisxInyqoEii9MQ4ItaCVAFixSt4YGH8rtg\r\neMiHUiSXmcqBdaNzUOoBXdSLU1OdMeAwvOBf1oi100GaQD5b+3cnC0lONjP0\r\nfSjwDgGeNsijir+qO99wjIBSFsq4kaHIeuzKDTLeY6uCSb+mrgpbYX2T+zR/\r\nDVORIFFJ6X0M5qJgN4gjfwypL7zRu8wLdmg=\r\n=cldC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.0.0-next4851_1680455429802_0.8217748173282815"},"_hasShrinkwrap":false},"1.0.0":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.0.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"634a2d4166ab7d3b145c2ea93af4425e7a1df423","_id":"toad-cache@1.0.0","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-m3I5JB8mTDEUgPq4rsuSyAYu1hLBe3xznf4dGR8eoIVLbdW6mRJnaHKh/5sadqbdfqQXlWuGJTN1CPThg9qcug==","shasum":"6704e5b1d61031fa222c50a31a3e34c4f3515da6","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.0.0.tgz","fileCount":11,"unpackedSize":47752,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFHkOGLu+XJZK5aupCSkJPVAxUDQkMQ8ER6mIi/N+Eh1AiAR84yglb9kUawHU1XOe5VCFFtq4iiOEqBy3pX6l11rrw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKb16ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqH7RAAiDBQykhUCz9J1fCJlrmb5pYCk/ajFZuk3iYR8X8BMBlG9hN4\r\n+hlkSqNyGKFAkqssW5Hlm1mhcEsPnYnzGnBiKbbxJvtUBnmkV7c9Ptxwf/EU\r\ngY3fdZPldGH/LRNg+skxxqjhhriho1S9SlTUIMIJtOuQ3HcKLYOEm9DAYKC2\r\n443Disjodfgaa17G4dUYd932Udxpt8p1Bh8a83qp8uFtCtSYxgzVDH7fqoS0\r\nxFWg+nmg/QhTo8ot7EgXVTxQU1OKzUS2nSejO71dOvv9cEL2msPRAxHpg00/\r\njek28noxq58dsu3snV8KsUqmPaEmMKP4cuDHr13U0kfDhhSRgvVy6zUFH0Gx\r\ncaE5P0OJj4iUK9vXTrz1ot7wB91tMZAp99+J/nX3T9DsGMU7NF2+RBIgTMD5\r\n1nc+2neAh85rjlAyWQs1ySHv9NW8Zzez+2lMDUXiD6ctSyuJ5whmkReASV0S\r\nU6Lf9JsYd9DRu9F8gnHnAt5exYNfjSze98W53qh2AnML9p8plZWjJ0r4V9yJ\r\nYZDWXkW0aj7B/LTe4/qxPV806vy74fVT+DBkUlijKp2M3RiQV9nuY9nJuFaI\r\nRkbaXqLuCg3yjykuHOn7Dyctb1PGY7Jyze41yfAYt4vXfwfsb6CLAqwx6+Ki\r\n/Knun2OBtdfnMz/TXHDktrRhj7ZNaxgfxrI=\r\n=XxpN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.0.0_1680457082099_0.7778973998341345"},"_hasShrinkwrap":false},"1.1.0-next1":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.1.0-next1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"0aa0e694be55c49a25d019db464ba99142e915a6","_id":"toad-cache@1.1.0-next1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-H2Vze3w9ijdHXnLsKJH34c4Tlr1gIBHdU7IjgZaCJAi84v7WSzvELItNBZkEl5xJyAI3XM0uwxVlcK3HENlpCw==","shasum":"393aed4eb3ac3b664cb1fdc4845a56eb225e049d","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.1.0-next1.tgz","fileCount":11,"unpackedSize":71182,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNMx0e/dSHWWkEzqylVUMlVG+zIGgOcBr26CLN6cs+TAIhAI2JqRaqKLWqIMay/HydS8MMs8Ns2GKl+97YLUUeWYT7"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMVk0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUAQ/+KBoCZQE+RoyrLlf29y/gCNx2c57FhbS+2kMsiMBGdvbhL0wM\r\nGsVVgWtJ0jBn8S8f0UDDhqiBQfNyRDeqGXum31vPmjz99rYsJ6DtvUOqFiTZ\r\n6B4BC45oQtOnAPx/cOUBmm8OUf73cQIZJdEVXGFlkHgY5kdvVujSOPfZwufY\r\nacL56EFXYuBahi8Q2NVDJbZD78F/q5+/dBL6Eh02JvHH2W8Tm9Aqro+l3upI\r\nDReS0hqk8urJuhrsZi9kYuFd7F4t556ex3PrQ1GyWvJgvb0lXLOUITg+v3xL\r\nC5YO7feMo4qZhVKvjheOPwa1+RFRU6hQMu7jD5h0A3X/RehkLLQlixUq1/hO\r\nAfJgYC3NvPPHqZzNGa1x1/KuVPtHPaxYQXAzV5EA//sCzaO9qTrd0y5oURxA\r\nv8ov0sFCcUNi8TlNUVeYC2Q6Xc8R/iB7gvMC1o0Dop/3RZltZqpH3ehAnLDu\r\nQibEYPJ2oVvYSjgPWWyjAi323OsfQvXrE9/Q/iaeQlHSHgjwI2zValAzgwtk\r\nx9grbiKJWCrkYZ9k7zg/S39ZRBGxSWRqtFYO0k4SGFJ7ai/uEQIlfSSZSsCj\r\nGfLDPORHG7MOAYs74pk/WqmEwY8magW/A3hpeMVxnLBBWIMjTJ+n7drB0LJp\r\nbAfg3mAMB+DRn0C+iCIwbOktjKVmUBHvFRU=\r\n=V2zg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.1.0-next1_1680955700112_0.8252119519589254"},"_hasShrinkwrap":false},"1.1.0-next2":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"1.1.0-next2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache.cjs","module":"dist/toad-cache.esm.js","type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.37.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.3"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"00f5484396e1cccf33f77eaa8ea1cc47aa95aec7","_id":"toad-cache@1.1.0-next2","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-n0hBzuc6ojUR1is+Eox38OcqE7urRMu9UzjFvp/ohsWrvBx30mOfpg72u3LWnmeS4CuUKmDqCQCNOK3wgPlYhw==","shasum":"7b99538fdf00a446e1ca551b0e2151b2f6e029a5","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-1.1.0-next2.tgz","fileCount":11,"unpackedSize":70913,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiTFg1FJydKy1bN38+aTNgeDgirjIJi7pJpZeTfgu3hwIgIt9MJU3JVvhXnuAToZ0BHZYYHG6qDhOy4ES+4lVTTFU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMWyIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqKw//SzZfJlNEYNLVIF11nr9DoM5/jV2ymxOHITIVxMDAxVvPQ093\r\n6knz0tvjQu8CBfMTV4Mxf0ca1q+XPQQy6BYOOnaRtKjA62CL7c6nWcOQp7Yg\r\noveiFE/6MZFeEGxzccck2+F/VGdcvVvKxPOVBU9DN/TH9L8viq6Oq9Inbs1n\r\nbpt+dlJtykowbTBXKuponWa9U8hAEr+ayKhU/vZpWcFVoGLk2eHvV+Wo/OqN\r\nQx1Rvn2bW8Kh/EI/a+MhrLdPHStIXelsiKX39ykqRXrys6m1qtRUz52CNMNn\r\ntBmRWiaEr0apNKr5CqV7XwUcC1JVCteAhhNGCE+NBjoHSO3mT8wlFTlUn1Br\r\n+o7cBY6nW413QS+ZojvlosEcwRMZrgyjVYgqt6NH+rn7JPkSNXeOCKNYELZ3\r\nVR415oV3khMH5yfYUVDdOsNPKvBN9/drs2gSqKXso1+rH/mvaUXi7q+6T9vW\r\nZZ5nbx/rnIRYaKWDFa/NuRxT55Ybd55NvhKyepOQya0tN9d/3vzx5p7Cukra\r\nyfVzG0pDxPb7Ocfi9F6aQ9bduumd+81YJRtFGRGMxcICULegM+8P8X9qFF6e\r\nYXYOlI3sha4Kpz31BBt6tQJZMuQZXejCcZN1BrUV57vNgI86FIm8vG+Nq3f0\r\nj1I36AIV9VM40KpK+ZzpstR8VTb7mfoOB8Y=\r\n=shoS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_1.1.0-next2_1680960648217_0.9208218165584956"},"_hasShrinkwrap":false},"2.0.0-next1":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"2.0.0-next1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c98360aa15734c33b88c3d8eed086c1fc2f0975f","_id":"toad-cache@2.0.0-next1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-F70zF4Yy019/3SEWDvake4RUCRSLWFLqXkP/oOcV8k4xkhL1Fsu6eHpMpFdc1lFIvRdwok5icbaXoJz0sgyiFA==","shasum":"68bb7d5d6d032acc1e16ab30af53e03be31d0256","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-2.0.0-next1.tgz","fileCount":11,"unpackedSize":29781,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAI9Hiu2JvAajwWQtMRtg3p3Q4rlcc3qzq/4SrtyOXcwAiEAxv+haRf0/aqcoPX64nwxQa4X1y34qCL+ZNVrnGxTtoE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMW/6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIshAAi4MczLzt+f4SqrHRd94p8oOS1HoLdzv2KInKPIWtwTpWYLhd\r\n5UKFGv7KEaCByyQdOCh5cT0ikXU6Jb6Y5ramWg0DY6SkMFsIltpkMiE2xJOu\r\nHAhby5o+MFe7x/P82Bsu4TrhYSexSmzA0hrJ/ZLEiV2GbYHTNN7akZE7JoNd\r\n+Ju92r+a27zvUSLV7ZnuA8ZZMVtShzw7rNbmER/OQPWvrmfNhoC9snmVniyO\r\nBnqZ4Up8qYsiACdABZ7BtzyWk72ECRUA4GMsScuv4RsNA52k3jGYb2BtvMXn\r\nUo096kY8/bx17Y/KjkkwCl/yd00RIN1dZG+kKPJvIMvPDleYWoErl1pQZQpY\r\nBSO2f9CxqYHXrqBNL5DKC8QZfJi1e5eGp7L368R4SpNjk0B0sD1c5XHpGvVP\r\nRGwJpNIQvzK4ePXfrr2Rr9TgK0Wceh2459T5HfAQsCsoW5cVTbHu32dKuQ9y\r\nAzB8nXeKnayZEgtDwl5RzdSLifPnVTEe83PgGA/q+Y4VdHGpZD05vnOez42O\r\no4cBim/qz9NunKT0sEyQVpxsacuB1RYv4+T7EyleO0pDpk/1SWFC6jgDG6py\r\njzFz/vReBzfo0B3JpSFCz1H0GvZw2BAH5HqM3Ao4dx04nUaKwuiBrBAJuntB\r\n5a/JlMCUewRG7hlKie2NKs0qWT5MHRF2wOM=\r\n=tJh8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_2.0.0-next1_1680961530109_0.9007213877127616"},"_hasShrinkwrap":false},"2.0.0-next2":{"name":"toad-cache","description":"LRU cache for Client or Server","version":"2.0.0-next2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run rollup && npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru } from \"toad-cache\";\nconst cache = lru(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c98360aa15734c33b88c3d8eed086c1fc2f0975f","_id":"toad-cache@2.0.0-next2","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-YfdZWqnqXO7fb+2q9cEizCqXNZxXSBejnH/RZbjHPfeqMHpN0fOlbRo8kZZP1Rmd8vB3rMTODpo2ikE/qjO6Sw==","shasum":"30818858f5dab747ece7548b62730361b1a87f1f","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-2.0.0-next2.tgz","fileCount":11,"unpackedSize":70968,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeKwq29cMfJANkqbOA6KpEtPuV/dtSJE2vZbw+orh2KwIga9pW8RA5Hr9qmj775jWHbBrvtHr/QCOLXcf/ePlIvhU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMXDSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrq/w/9HHChJHBrSAaBAux1sLIN+RrX0N/2K4MOYJ66PQNCIC2VqO9S\r\ndO2V7i0LeP468PMdkBn5APY9kLoLpSX7T0qn7FXO6Kci4/f4NsDUTfekuOA4\r\nKRX75KXmN8nEgFd8gSIi+5gxcym6WnFW98WwQc6GXYMEjXddoU+l9D9HYiJu\r\nP8SgQ4s6iYFe1k2ptqE+JLwFeXFdiGyeiXk8hddGxwM670qliQjpYMmKZMQo\r\nwFymh789sbvD9bKoMV3YXYNQfJXABWDAp2o2p+D/hw99pvnPQp2hJsPt1C0l\r\nHorDAoolzHxaVmOIVFqZkaJ2SDVdRuJrnJdZRTqWemD0bTddYNTBhwx6i4dg\r\nkNVV5iy+4oU/LbaP6SDfEiFfYtvvqMsug1/2W1ni8YrLqdQeQ/oi18z8A/BU\r\nVQNpYRZXygyA3QV69qHaCPhy4Sm4mAgqPf93rabNJhHb16VgY7v7zjPo/TfO\r\nRVLwUfyYSwn7FLoGrWxo8gmilvsXqwZjQf39YhAwWFf8mv3x/c8ig0+FQJz2\r\nIuyR/ACai2tSiqUKuovzlR9tTo9noJIQj437E1C6l7MKLCOU6c+OWy2GrAE6\r\nUe4dXEO9p3tZty+qgFyap2qEHNTiFUatyLOOjgHk/L9JlzIbSZwYdBeAvsYW\r\nX+efRiO3ttIYjjiiRruuUXrJvPXCfit117U=\r\n=xgL8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_2.0.0-next2_1680961745925_0.3398819502746582"},"_hasShrinkwrap":false},"2.0.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"2.0.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"6eaa0226e95267de7d0cb36d96e5038170decb4b","_id":"toad-cache@2.0.0","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-4stcn4K39594gkCoFeyJd4GwN9R3FaJ73Qi3qJl24YVSyRfDCZwNfBPeBb3Z8f6qnxzsDlO1QbM+YGRRcnEXoA==","shasum":"b890f7719dd7b69f4749f7284fd0bcfc872024dc","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-2.0.0.tgz","fileCount":11,"unpackedSize":70924,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUYGWcPRSbNNIDixdCFe8xiTyPs7hLXvIBlQbNvXLJ5gIgHbr4Us1VMt7j29ltEaYDmwyt+BxNZRlu+eIK1hf4MZQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMXRsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuBg/+IPWX0AZqAL8O6iEMIrGEi6vXibwB33+rk+8WeT/Z4DeFfs6k\r\nZDj4iscNsUOwDIsqlsXutlfdrNsmJe0AF+R0q9lGPlKgNliylyJZqhcdlnpf\r\nnoIf12GQvpdtA7ZxLUFgYI7KWIA79r1e0GhRMpbds0lkJsem1b/kqXBOLO4Y\r\nE1jCDYbPSGDxziyOwF2ba6Wiq+OmN8wVQ1EmGtBAqDQXma3eCHQEHerMOiry\r\nTL4+Atyr2ZVPbkh917R/X76PbSS/BfVZPW4rToWYVPlELXbp4UK4tvQDF5Fh\r\niowR/+nH2HQklFqiajb9Z/Uyze/gvs1ggqAYzG0bDhKz5a4kqooxIhUC/CQy\r\njMOLKRDy38gOIor69zHCrbcvmAeQ4Epatvqx4LorKwFWZ/GJTS1mtOz3pRuA\r\nEcqEgbJ6uVyc3T1w4meAYGcY1/o/pW8xHdgoESHp+kfDzSooDUI9vOOWN5JQ\r\nBFvmbz5wzX7wMUs71fLs9fTnnZ0d2soL5qYaGQ/8/tSbcTVKkVNq3lnt2v9T\r\nNO1QGgPXHmNQxZpVSfAJyEOpmcBGGDv4Bw8frShSzwErBKjDh+99LLPD1Tsn\r\ne0IEhuFCdHp2c+ObJapN/P6zTkuGSDozmwxsZCqU3MIUHLBNQta/EqYr3tDl\r\nDiYBe+NvOqfFsTuP12Z47iuQOMOSkrapbYU=\r\n=4amD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_2.0.0_1680962668092_0.05948938281422578"},"_hasShrinkwrap":false},"2.1.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"2.1.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage","types":"npx -p typescript tsc src/lru.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"d92a743c850f9e977480a343e55c451037b5f39c","_id":"toad-cache@2.1.0","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-5DkEgg1qXxYxMcNqtkvYiXqESPWKVRkAZ07x2qBN87+bURLlHDbUq0TEUcu6woiwOoJ/Ty6lyIqFjy72gJLZIw==","shasum":"96f73296662d028559287b69b0e34c992380de6e","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-2.1.0.tgz","fileCount":11,"unpackedSize":90554,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCiaBUNHmfrV1PVIqYXBe+3SdzhgJwgu1ZIkv4j2ckeQIgIn3Jb6z0aMTLs9kF1TiWxv6kk+gIQb/mSLE7tYqqwDI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMXceACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrw9hAAnp6ZRZ1g6SmlP6BKiDKoEbRInaZ0wrUGcDcdDtcWyqYubX9c\r\nl5b2mXh7P5NbvMYKbOiPCq6THJMt2RV1KPEUrS+FJNUn2XgRRJAVqV9/p4lB\r\nGkV9bghMJah7A+9+oEI5BUZNHH6YI0ZLpyowy5wcpjbBCD6uDe+yoj5KVRIz\r\nDyB3dO+oBZCS86deDBj8TxIKbIogiezWcKwwHEuH0m4hen1MrQUkeQHNz5Gx\r\n6la7Vx67hTvWVkGy2HEPyEuRuVNNm2PbG60Z0wQOMehfGNo8pak2nErNCB97\r\npB2cD/SiFV8XaxJUhEIZTlCGQXZBq0hdEMoaS9PAmoiLbZwyPsIMLnRnephB\r\nf5DYGLMsPwOKUkaktf0agkrtUAmmwf5LZZrQ4mawFIvVTwvapky8Jr2f+edK\r\njccsGwl4gvUSXp3o6thz6byNPgD/IQV0Pk5OfCuyy7h77mvWlQvvm7G0RYRm\r\nrMaKerhVTNlLTQR3S9zayu+sD28iILukFeZXJqHl4W8sehqETIlJwBhLrCXL\r\nInQWX0U4YUoCwurJPZTsyD3l0IWsd1V1o9O2/Q6xYX0WZO6NnnMegcHHK971\r\nO0C6+3o0NLbeHfzmmPAPMMO3ItaSHuViSn6NIbGXH1jLtHHBX0NV7p4z69gM\r\nvi+k2LdossKp8JxeYoXDQp4VDQVjDTRV6FA=\r\n=vCEK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_2.1.0_1680963358328_0.9630404499161609"},"_hasShrinkwrap":false},"3.0.0-next1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.0.0-next1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru, fifo } from \"toad-cache\";\nconst LruCache = lru(max, ttl = 0);\nconst FifoCache = fifo(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"41a2fde4f58009ea3fe27afcb994066358b3fe1e","_id":"toad-cache@3.0.0-next1","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-/sX2Kdm62oXtxSjdgYkycPjIPTtss2ACCO7JbD//q0Es+lp+jjvra0eBOGjqGqyhqD+lHH8jLnPiM7JDt20gGA==","shasum":"1f48ddc6ac38d8cf835c8abba403b7f291201440","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.0.0-next1.tgz","fileCount":11,"unpackedSize":90120,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDnh2nQQskZfF4LNuC1lJ2zOBBpqdY8DC7MziNTW1HxiAiA79aS4cOosEe1KwJrO/zFRsL9Qul6HQXDtKfCOIgEPVw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMrxqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwYw/6Ahdz4T5LnNTBeA56c8yM70/6FJlxBqubA0ITFRuz6Rkt4XIb\r\n9x2tSyYJ+kJ9kfEQozOPbWB/mKRkqccU/L+zWCIUHw+i4VC0/WxBSM8SqeGC\r\nW/jGgHGaYMg0j48GGhFy/slHNhvoMgHIUg73mOmOAXiIesB41l2TaCsTAqrr\r\n8jMDoZDBYSROrSWfg1wDPf+nxz7gbI7DFIDt9kTLixWhlLQFPb5xJwT/jTBi\r\nDnpU5zYviSJw7gbbdtiouM6lkFE/CTQmVBUdP1i9FVeSWNKov0OqzS8MLt33\r\nRwzAv007FfXQqXlc/t1hvgUxuxV6nUycKMArx8GoDFGqEU/O/slhOL58vXNR\r\nleLYQuGFnwsdqduy285+HWj94cAtAx3PnKLsZDLn8NhfNMqjtEm49l0WyzhU\r\n6e/4/Xpo+gvvP5qmxsIqxbg+w/NcPPdXFIYbVQUdgAbO27fyeUeZWCVe5ED8\r\nom3lASu5zqRumXpaxpSMizkN3SLKFPXfttbA2j7GdV6eXc8IBTslOlpzKuU1\r\nhcsV+TJpk3XJkA2VrftbyRmKyGAV9EdUtFuug0zSRjV4HQlmF2Khj1ex3nSH\r\nhan0pc/I9b6xOClb67SHiPn9vGMpZ4piGLMC6/1JSGYuWHI3K9YHP8MuPNs2\r\nLgDJOLCHJ1SI4goYevL4/kOhTPlOGMiOJP0=\r\n=fQgf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.0.0-next1_1681046634537_0.9483080803937676"},"_hasShrinkwrap":false},"3.0.0-next2":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.0.0-next2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"readme":"# Toad Cache\n\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { lru, fifo } from \"toad-cache\";\nconst LruCache = lru(max, ttl = 0);\nconst FifoCache = fifo(max, ttl = 0);\n```\n\n## clear\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear();\n```\n\n## delete\n### Method\n\nRemoves item from cache\n\n\tparam {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete(\"myKey\");\n```\n\n## evict\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict();\n```\n\n## expiresAt\n### Method\n\nGets expiration time for cached item\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt(\"myKey\");\n```\n\n## first\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.first; // null - it's a new cache!\n```\n\n## get\n### Method\n\nGets cached item and moves it to the front\n\n\tparam {String} key Item key\n\treturn {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get(\"myKey\");\n```\n\n## keys\n### Method\n\nReturns an `Array` of cache item keys.\n\n\treturn {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys());\n```\n\n## max\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = lru(500);\n\ncache.max; // 500\n```\n\n## last\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.last; // null - it's a new cache!\n```\n\n## set\n### Method\n\nSets item in cache as `first`\n\n\tparam {String} key Item key\n\tparam {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set(\"myKey\", { prop: true });\n```\n\n## size\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.size; // 0 - it's a new cache!\n```\n\n## ttl\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = lru();\n\ncache.ttl = 3e4;\n```\n\n## License\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"41a2fde4f58009ea3fe27afcb994066358b3fe1e","_id":"toad-cache@3.0.0-next2","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-BgjzB/apjIPhwFwHkYTMNfNJwMUvxWoptLm46LowUCIu3E5McHosSasg9tTcrIViZHxi2aSkzeIq7IOtWwi21Q==","shasum":"008002117d2d6a22dd5b8ebc68e7b729671e3516","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.0.0-next2.tgz","fileCount":11,"unpackedSize":90347,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXhYF+KkBb4tIEFf6LxJcOqDCCzvBMcG2NkX8/cp/tFAiEAr9f6RSGqbyJMvbUYTgeus7XmexkI/Qpk0qcPKcvqhsg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMr+uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUQRAAo9PpXRdikK+TJYt2OSALOOok5U1xM+Wu2VmZIMNI60JqkvmM\r\nkqLG/ud5Y01hwXI04VGOrA+e6GBRJ9/CLgNs7DRvzJ/wSQReiiCvueEl5TVN\r\nn0bN9ArB5gnn+tDdJVnrnFyksOQFiwf1uo1hlJ2NtF8FUcsuSkCm0qmdhjqn\r\n1p9H+cPuEvQavkzIPC+iXL9nEK6t0KDW6o5Bwx+TLO2YrugqgdiYfjSkVO6Q\r\n8bplmVmi7/f2J33lRMHnVJLkIx75lkoIjFs+FsCLT24TFX4z1d6s6v4nKS2E\r\nOOC+WWwe9tQCkyF8FBW7h34/ZLWOk4MWlPKjCz/Y96kdFJoKByb+jwuQathv\r\nxNcz8FDKVy2F5iqTGYBEFX3KayPmErWZ19VZqezaDnhqHUiLKmmK7Xe1F5Hx\r\nznPrHd6nCiDW9oiDxgj9Owjwi20AqgvZF6iBlZGIc2JrLCNtBmuJRE+CeWuG\r\ncvin2Exlcnma9obCBxAMlKiavHGmENjAv2Wp502uWJS8MHuEX66W+E2Eqf9G\r\nuCerrortjb93Q7zqFodmHHq2SacOitZyLQOdj/Z2nYLnjFQrtZs8m8Iqo6Xz\r\nr1kyCDYzuue3Z5ADUjDkBSRrVAXN+S/aD2ws3BfvbKWRsr50pFDqsT8tHG/h\r\npufNMaq/H7ofqqhx8kfCOwB++NhuxAOfPSk=\r\n=Y0IH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.0.0-next2_1681047469802_0.2301106893646223"},"_hasShrinkwrap":false},"3.0.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.0.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"9d5d7538af5b4fd2df9d628243d2330664a89601","_id":"toad-cache@3.0.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-e3LzKBQjCn2SCRyRoYoz0O+OyAPx3QpKjP2SGdTne339dGViM0kUYxjr5gIN1FcoW/UX3MdcTp9o2FY+C2JMgQ==","shasum":"4ab4629511d48e512ccae2f2431e3ddc11076c7c","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.0.0.tgz","fileCount":11,"unpackedSize":90311,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvtbBNEh1DxsszWd9gt8m1zHJYKAA2c4dOqpC8f+BwxQIgFAeDTYNc3pLNG2+G8/LvTgWWDxhy17B/mg3aaVXny24="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMsHuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSZA//acNGf31s03MJ9n/GmuDH9gYmkAVO2SrPu0OtiAakD1wv2fGw\r\niUjGRLU65tk4YMyiAKc3zpEXEy3JprdVC7UgmO641NoBHmKfl/InfeZ85daQ\r\nveGklo+/sx9YgqMI1oh9LeJmvf5DXvL7Fjf2OHBGNRtt/jNzMkl67gRUWJ5/\r\np2cIC5AxZ7V6cWOtVl+oUPSWZJB7PI2LzkmncTbu7AIY/57e7o1Slftd+fIB\r\nO35wdyVXjNyyouOKXzkMLoq6ycwMByt2n2L0lrvOObeMDeGnyak8brEU6IjE\r\nX1fhXGFGMHEdNzaWxx6holtH2d1tiQ5An37VHWofmyaFwIyxqN293fAiH0QV\r\nuPugnnq0jbPsBns3KyDDP4FGK2YnLNXDFO/1SOXlqPVl3gfaFhOoSA6tX1mU\r\n/YFQWUzTmhl7sbmCn7ZyjIlgqU1vOWM2+JB+g1C+OKhfjyjaWOV8sWMHDsBZ\r\nI1Fu7nQAd4zyhShOMqVq7Jh8/OiyFWNezHjwcgnkBy5WLTes/j8sIlntn3Pk\r\nkjPrixXwcBr1xEAvwTQ+RKTk3REGcGtl5veCIayzDosvCH4xLNXZ/q1/YzQ6\r\nwdCQz3VsVsQdzTh6OY+w4J3tHH9FjqLYkChvm2oMML/YY0i1eh9BB8lpUKjV\r\nCxI22bmr1o4WqcYd67hlSO7MVfTxHu/oVIg=\r\n=pM+F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.0.0_1681048045874_0.497407741804629"},"_hasShrinkwrap":false},"3.0.1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.0.1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"d075b5bd2f6555366901e5e1b7c73bd560413473","_id":"toad-cache@3.0.1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-+ZAIbg9DzUSXJHnUHf1zqKkgicUFGTgCEuuut8w1Yy+0oJQQngncAFo5UKbHiPahx04oxuo28N9pDTJN2t+fLg==","shasum":"e6a7c07332d375232887191437272aab3ee6fd29","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.0.1.tgz","fileCount":11,"unpackedSize":90339,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD2JtaPSUbmS0AiScfYfCAMCvyJwa1Y5Jvf6+Qmsn7LgIhAOwx5t+637OVC52iRvGDbj0d6NIj39ndxtmHVWJrKhLH"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMtO5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWKQ//RCP0U+4rnTYrXjZzy4v8mYecZh159e6yUB3e0fzHc872GZ/X\r\nlp9Jso/pdbOFf6GSHcWY1ueYXnsiXnomBjG82gpTA4MuI4AOWkX10r/4Igqu\r\nwlA471PbeEt+gGlkyShIcJAhBQefvxImXJx8Cyr64asdCt/U3UTJDE4ohqLU\r\nXDheXYsLkWBvhFcfeOsFyO/fv5zTMs1HX3dTE9cimEVfL/Wnv0zLnWwa/pI5\r\nUyJ5CZP3QjEFQiMZedH4zDx/dygO7ESBO+77OU20O05GWM7Xo2vOuzpciv1j\r\nAHgNNWUu2XznbZ4p7tlQXD7kL062crgtDptGowYwyZPyPmxvpq7b6FEy4cPo\r\nXOaAlAipienXx3h8TxN89q9emlWMNactCG3CT4qP7rIwSyAz3cufv2TmbNTN\r\n/E3s8bmMWIbKwuFsOkfJOv/8QxxBhymC51eho6kqi2nCSCRRuPBXlvUDbJKY\r\nVIdrATBWOVjv4J03ae2FrVOh6y86G3AywFCFzF3qRVY88v0AbGscKbSYsgl2\r\nu53Y3G7ZuxeQLv8UMpRjs75IPC7LddEP2Amy6c89kc7FrPh6XtrVhg1d02u1\r\n7bDO0RksD7elHzr9vyodWYMH/EIkbJy8tXfj9b4jhu7mqigjINRm7uI9fAS/\r\nze4TPcffbAVU32DapTfGxmmJfhL0gK6pgaU=\r\n=GI7F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.0.1_1681052601231_0.3054889921084496"},"_hasShrinkwrap":false},"3.0.2":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.0.2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"0.29.8","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.38.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.20.2","vitest":"0.29.8","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"63061cde4aef57fc654cd5676ed91b3de963b3c1","_id":"toad-cache@3.0.2","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-T7biSLu22S/2Zg4+1DvLYXqueOCKksZewN46fQVeCcH0EgrBFZx3VY5kAhLWHacYq1Ve3pFrfK+KDp0bZw6Ing==","shasum":"ae6a09b40230f708c646f088720a3c96d46d804a","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.0.2.tgz","fileCount":11,"unpackedSize":90373,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfgcFDHMf7mkmFF1CBSr1A1cktNkn+WC4CTDoYWya+lQIgWmcJGI4MJ2wiFTPxDtGfdnuE3Ajk3Bx7R3QYG7G3VUw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR5f3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrImw/9GA0oPHvxzSbY1+Wc3rGY3rbiRQQwNesiTSVq6P7O6MoRySdq\r\nPS7UVxIjdNfyMGf/T4EtSwNGqKsTAoSQI1N4hLxfxm1rtf2XdCQT3/be1a4x\r\nL1tSw2Y64TbzwE3p/pGLyhrRXpW79UGCxXAGe39aD8IIeXDBAGdAWvfw3rzA\r\ndF85AXbyVwSYeZgzRhBAu9KLuDLpPXZrzn5XSlNvdq504+uDxGE9vWaI9ri6\r\nheUTfLi2UbWr4+6Fgigfof2CTwVwxsC9hl0R0tNTK/xl88tvdI7D2egJU/X5\r\nL0qyMR2YbDmSJ1XLlOIziVgZKXwBLYd1kL1XtWnhEADlUfoVdVLXFFVes5Ed\r\n0MgQRbcZciRqvHOatIkMMucDKrGvpUrXTz/eqAmKtBCxkoKsTxMqljVDdmRx\r\nndyEkF/a2U9Md+HJpW+ZLByrr02pP+i6joMlIzIhZgMRSP5FeVP7BjH+GCKv\r\ngZ5HwqPGGvv1BOfWChCJ6QswVcIyE8Akc1j8vcO0uQMrNENDqMCZsnsJUw5H\r\npC5TKJ9lebvxDjydKWT+55KQ8KVIsB4Tb5v8U5telrdfrDwbuBMSFVPtC1n0\r\nRV8GKzOzQOiHIlnTQeBL+bG62o8hp40A5NgVRXtI4QrMNTB6lNzNdkVPutGO\r\nUL7fVF/f0CNVQb9w88HisC3cR/uFphF+JFI=\r\n=o2VH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.0.2_1682413559027_0.0790130118690433"},"_hasShrinkwrap":false},"3.1.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.1.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"^0.31.1","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.22.0","vitest":"^0.31.1","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"392f11da874e7450fbb4fba47ad44d16a1d7f4d7","_id":"toad-cache@3.1.0","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-6iYwqpb5YjAZp87LNkIzc+VmYtf0uMbnSrdXU+gX5Q6zhkLIs+PZ31lSzJ5HCzBmjZ8S2MxFTKC5p5DNTpBt6w==","shasum":"e00e6ac7fb27ba6a9e7bea60e77ec575f3799e39","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.1.0.tgz","fileCount":11,"unpackedSize":116276,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH6FgOV6WH739kwzM8oYwFBnDdanT7KNNKZo1fyx7oefAiAp20LhAPa8cPsdseD6nL+b+YdPNFYQYHnofiyGJ8Lacg=="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.1.0_1684605337924_0.5126377184825863"},"_hasShrinkwrap":false},"3.1.1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.1.1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"^0.31.1","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.22.0","vitest":"^0.31.1","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"f7971016c6e605a1365addba8d3ba115cacc0ff5","_id":"toad-cache@3.1.1","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-t9600T7pQWbNfQZbozJ7EnkBVPZKqQ+c7YEvtFyzpyx9E4JOwxRlTdJo5X2sE9fL3vc5bqna93wKeXE0mvlzUg==","shasum":"97addcae56308213b36f5e82e9c8c9bb51f35461","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.1.1.tgz","fileCount":11,"unpackedSize":116867,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtzIsg4SgQoEHWFY+wzR4RKMM6tOECf+NjBUetPwAYfQIgMk3Pp1JjCT6aPKY0VgC2PLVBy+dWcluVRZg2BHgQGO0="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.1.1_1684605938322_0.46653501483657434"},"_hasShrinkwrap":false},"3.1.2":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.1.2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"^0.31.1","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.22.0","vitest":"^0.31.1","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"ec6f0d123fffa62c774d04c6559f43a45142319f","_id":"toad-cache@3.1.2","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-dUC9ROefWCv/0b/RLQDMzU6tFqM8EBjYM27xiXl2xc3DQ/R9HL/8/cBRuJ1hG67naFPBlyjBWJwvQLyQu8KUMw==","shasum":"6759a5db877a2550f2e333435f18dc150cf78169","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.1.2.tgz","fileCount":11,"unpackedSize":116490,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBMg8D56D5jIkDyZ0NL0Xa2dJdHwtsSBHJ4+i/3EOYUgIgWMRFbN6lMmq94LLkNLuoAYtNruaODsEIlLq3+eprXgg="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.1.2_1684607119894_0.6832080519645776"},"_hasShrinkwrap":false},"3.2.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.2.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-c8":"^0.31.1","@rollup/plugin-terser":"^0.4.0","auto-changelog":"^2.4.0","del-cli":"^5.0.0","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","eslint-plugin-import":"^2.27.5","eslint-plugin-prettier":"^4.2.1","precise":"^2.0.1","rollup":"^3.22.0","vitest":"^0.31.1","tsd":"^0.28.1","typescript":"^5.0.4"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"53e97c30525d1e3a135b8573af17feb62b07a42f","_id":"toad-cache@3.2.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Hj5zSqBS6OHbZoQk9IU8VqIr+0JUpwzunnwSlFJhG8aJSInYUMEuzItl3kJsGteTPd1qtflafdRHlRtUazYeqg==","shasum":"8221a1906ce7bd18cd56b22f5603bcf9e38b54f9","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.2.0.tgz","fileCount":11,"unpackedSize":118087,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwsevqjqkv6PQHga1VMrzBUDVWOYk0jrKY0XKucpHXbgIhALYGc6bhNzzCEjpeEi7Tm4sOlPi3MDwI/lcc7Ko+dhAc"}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.2.0_1685001585849_0.7807607123406113"},"_hasShrinkwrap":false},"3.3.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{"types":"./toad-cache.d.ts","import":"./dist/toad-cache.js","require":"./dist/toad-cache.cjs"},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run test:ci","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.3","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^2.0.1","rollup":"^3.22.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.2.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"gitHead":"258f2ac6687c8ad218bbc606c4ead139b19f6247","_id":"toad-cache@3.3.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==","shasum":"5b7dc67b36bc8b960567eb77bdf9ac6c26f204a1","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.0.tgz","fileCount":11,"unpackedSize":128096,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpS8enaav5JXbzsLMKOYKOafT/cd8gEKgUw8YxFOWpkgIgS8YIs+OPqVemV5lhpgxAUZknCs8+8NcITsfzX2RP7/8="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.0_1696331962968_0.25480241934071746"},"_hasShrinkwrap":false},"3.3.1-RC1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{".":{"import":{"types":"./index.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./index.d.cts","default":"./dist/toad-cache.cjs"}}},"type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC1","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-/e69tTYE/JOeSqWknlzRLVeGIi4nKmt1jNeAUxxBd4moXZp6zEV2WW/cAjiZCAa0d4I5i2n6HpMVuZELTuNUBg==","shasum":"804ae1d0a2cbd1e14444a936c41b97ed7affd64d","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC1.tgz","fileCount":6,"unpackedSize":41178,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXwsBgvAMnDGwo7QC208tDfwf2IOIoYje7HzaOary8cAIgdoccgxgWUcz3Z8WOwg3S9GfL4LYvCc+sqMgZ95hH/3c="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC1_1701293066886_0.6407181575511083"},"_hasShrinkwrap":false},"3.3.1-RC2":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC2","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{".":{"import":{"types":"./index.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./index.d.cts","default":"./dist/toad-cache.cjs"}}},"type":"module","sourceType":"module","types":"toad-cache.d.ts","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC2","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-ePz3X8WeOuzeKDQ0XGOVj0fJ6WJHNcs5LcGzU3V1v0hyuGAeZo0QajCLIb8eQavK5AoC2lxd/KizuAHOdFxq+A==","shasum":"cfad338a29c8b366721d9f1339f5b65394d0463f","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC2.tgz","fileCount":6,"unpackedSize":41208,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFngedBMHwHDhOKGWol1JrxphXK5HD/jju5yH13Tc6LAiEA6f0o4oG9FwzUannauK0MQ4mWJzjJxGRA3wlRCTRjb7U="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC2_1701293117435_0.30829066613349565"},"_hasShrinkwrap":false},"3.3.1-RC3":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC3","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC3","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-J8DVoSfmJ4GLQrBadBAmkK1h7TkbUU5XW3oceVaKwGhiS34wWwvx6NK456L0JBmYCLewIT5Dxh+h9fb9UkxzTA==","shasum":"2fac22978a04c08fd5d9f60cf6b0adfe69af522e","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC3.tgz","fileCount":6,"unpackedSize":41188,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE6yFnrAHWZV2xR33UEyirrjPLtFpEtBR13bRhi/U7J+AiA4JKsy/MDkTtE9OD88TuubMZl0RGyTVcS1eJaKRXDTSQ=="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC3_1701293164176_0.44378069848862434"},"_hasShrinkwrap":false},"3.3.1-RC4":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC4","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC4","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-N2hEE+Bgt14bBcCOOfWWP9WqA/wLFGwm8uvq8EqPYNNhYp9OCU8vODNHKeho7pWLI3MUq1L9yUZ9oJ6ZiPJExg==","shasum":"03200460933db468f2db0c1e03d2ff34fa9539fc","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC4.tgz","fileCount":7,"unpackedSize":44293,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtdNuqFxtnITW/YzGFTSApZUUhxzKEdKNw44J7wOI1MAiAjnOVycNZEg2xmUBFRUarO87mqmPetSi7PRIXNIx05vw=="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC4_1701293224112_0.9592830671685297"},"_hasShrinkwrap":false},"3.3.1-RC5":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC5","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","main":"dist/toad-cache","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC5","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-6VbZFrQf3/i2KyM6ycHhZOwREMM5d1PvdS4cBVH9PBIC3Pp69B25avl61y44BBasEMDB3DCOuUxZjHuYLcWr0A==","shasum":"e556203672ebac673ba9601541220e15794ed1d2","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC5.tgz","fileCount":7,"unpackedSize":44325,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAHgXIx3e6Af3nkxXcWdBI6Aedygyva6t9riDek+ml+QIhALhWTm49j6Vygv27Vky2Ggdd0sbDUGF/4kWQlldeLQNM"}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC5_1701293268801_0.13961105868687662"},"_hasShrinkwrap":false},"3.3.1-RC6":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC6","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC6","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"c5f49253bd2c8bf1e88c79bb612cd1a5abb0dc15","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-kVU9wcYsM8CRphcCFWHJTAbb0oCr8ymEByJe2oIRQiphY2agGD5Mkom99Qw0MolfV3ofvrQv1rz+pHi3aumi8w==","shasum":"c01efe2a2f294f0878409cc5ccd80183fe58c280","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC6.tgz","fileCount":7,"unpackedSize":44329,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPs9fsmr77uCXV6+aonu7Iaqo+ZdxWiiypxiBq79oVSwIhAPO09BsGvIYbcLffdYGvDICkyVFYTYMT69PEO4AkRz0j"}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC6_1701293797004_0.04115403392993788"},"_hasShrinkwrap":false},"3.3.1-RC7":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1-RC7","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1-RC7","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to rotate statistics. On every rotation, data, that is older than one day, is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n expirations: 0,\n hits: 0,\n misses: 1,\n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md","gitHead":"45f4bc7e10b43b6514e9f65749c4af402e97584a","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-XDTHuvqBadIDxOsukUeEAIuFy6jWzA3Rt+vhpl7dPv/rYeRexvdrqB62wv3TvsDb4wvCI7pc+QTlQYf4kiYD7g==","shasum":"1e191048756964b5083ea4828906173ee3ad70b4","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1-RC7.tgz","fileCount":7,"unpackedSize":44310,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2KyZE6WPVPRBg4TfgfWlJIZZ6sk40BkzlsFxUFtX7uAiBnwoFVBPMHLAuggPyM/kBHFSsYjfdcd3xEaZZonqLi4w=="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1-RC7_1701299194656_0.811264230127068"},"_hasShrinkwrap":false},"3.3.1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.3.1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^0.34.6","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^0.34.6","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.3.1","gitHead":"db962f09e00a3f1485ffe1f188e4b9ce3918ffc0","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-oE5vIpiyKEuyYJiyp0gYhiD1o7BmiPCJZX9pboK9X6EfdYYmNsk8m7J1kBwMt6H/avuDsCdEhassrMMxwW7h3Q==","shasum":"d8932ab44043f053fb5d4019f37e7917069a9d85","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.1.tgz","fileCount":7,"unpackedSize":44298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZFfCxUisMYNgy7ldNa2YHM+9OykhlABVq/LaFqRlwfAiBd2eqLcId117zCjGZdA86LErGqNulmPgRij4hVrL5kQA=="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.3.1_1701299971252_0.539371582895289"},"_hasShrinkwrap":false},"3.4.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.4.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^1.0.0","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^1.0.0","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.4.0","gitHead":"f06c80cfe4e0cb2423af5449aa12713120206734","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-c5qK2vkZsv1cLNXgjAELucIxR6wvuYFEcQ6+anB3gemkrkxqZteeUMb8Wo6XAbaxgRy4jsLFySUkTA8f3F61UA==","shasum":"a31ab5fa5f2cf44623b7ab64953e90799f081c36","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.4.0.tgz","fileCount":7,"unpackedSize":44609,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWFs7sBoEPJHkANDF5A0nqOX6c7uKM0R9GdfTNV9niRAIgGYeu0biGKbhH2cqiLzrKNZrl5+EqJac1eysuKMvARfs="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.4.0_1701883397562_0.9664017884566052"},"_hasShrinkwrap":false,"deprecated":"this package has an error in types, use 3.4.1 instead"},"3.4.1":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.4.1","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js","format":"prettier --write \"{src,test}/**/*.js\" benchmark.js ","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^1.0.0","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^1.0.0","tsd":"^0.29.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.4.1","gitHead":"e71f8246b3747b491889761f30507a0cc8b7411f","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-T0m3MxP3wcqW0LaV3dF1mHBU294sgYSm4FOpa5eEJaYO7PqJZBOjZEQI1y4YaKNnih1FXCEYTWDS9osCoTUefg==","shasum":"a3506a9e0f877d751832083e2ee4ed8fb151b3e5","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.4.1.tgz","fileCount":7,"unpackedSize":44653,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFea/p5w7VLT6PwfZm65kpaA07in9qxBAYaCUsd7iC9KAiEAkZxs4XT3fMP4LhBscj7sCdsWRxhTCG2JcJNT7QjYykA="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.4.1_1701883995349_0.03991718949992906"},"_hasShrinkwrap":false},"3.5.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.5.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js && prettier --write \"{src,test}/**/*.js\" benchmark.js","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^1.0.0","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^1.1.3","tsd":"^0.30.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.5.0","gitHead":"6e6ab5c92a27abcc010a0ee4933d40b87c40a130","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-kgjpl3FSy20vEA3W/4iPuR6YvA2SN1ho4qnwkQV7REn2leYznSr3z+R6/CIeoo4WKI5nJRUxOYfOiZNAklboZQ==","shasum":"3fbf047869abc4a9cfa94dd264242ba2644d1322","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.5.0.tgz","fileCount":7,"unpackedSize":47608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDu2zTYKpv2EDIuPkMm+zuIN6FIxeXDy+6DRDsQzzOmDAIgQslmiSEFp3m+Y0OLHp3jDr1mn0vPUAnBzlMsBe3sS9M="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.5.0_1704730039227_0.08215664152440949"},"_hasShrinkwrap":false},"3.6.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.6.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js && prettier --write \"{src,test}/**/*.js\" benchmark.js","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^1.0.0","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^1.1.3","tsd":"^0.30.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.6.0","gitHead":"6ec606b9ab975a9b844f137a0a31f1bacfc2e93b","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-J/28z2q/ZGiSwjvcOVox8INHKOlG48o8D6ZWIxR+1ZYVNO8rJpXe14nLR1SnUNyaJfUN+CQ00gC+aPKwit5lHA==","shasum":"469ed34a89bb6d17cb8c4edd866d4f3e1beb5a96","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.6.0.tgz","fileCount":7,"unpackedSize":49130,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNQAEx4hAri3KApuR8kOOrMQ6pdmxkmPwL5D/b+/aY0gIgfys+zuhn8USj1T9DDGbVJOSiY66NCVkxfbKNL54OL54="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.6.0_1704801818554_0.5394414935480585"},"_hasShrinkwrap":false},"3.7.0":{"name":"toad-cache","description":"LRU and FIFO caches for Client or Server","version":"3.7.0","homepage":"https://github.com/kibertoad/toad-cache","author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","source":"index.js","exports":{".":{"import":{"types":"./toad-cache.d.ts","default":"./dist/toad-cache.mjs"},"require":{"types":"./toad-cache.d.cts","default":"./dist/toad-cache.cjs"}}},"main":"dist/toad-cache.cjs","types":"./toad-cache.d.ts","type":"module","sourceType":"module","engines":{"node":">=12"},"engineStrict":true,"scripts":{"build":"del-cli dist && del-cli coverage && npm run rollup","benchmark":"npm run build && node benchmark.js","changelog":"auto-changelog -p","lint":"eslint *.js src/*.js test/*.js","lint:fix":"eslint --fix *.js src/*.js test/*.js && prettier --write \"{src,test}/**/*.js\" benchmark.js","rollup":"rollup --config","test":"vitest","test:coverage":"npm run rollup && npm run test -- --coverage","test:ci":"npm run lint && npm run test:coverage && npm run test:typescript","test:typescript":"tsd","types:generate":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir .","prepublishOnly":"npm run build"},"devDependencies":{"@vitest/coverage-v8":"^1.0.0","@rollup/plugin-terser":"^0.4.4","auto-changelog":"^2.4.0","del-cli":"^5.1.0","eslint":"^8.50.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-prettier":"^5.0.0","precise":"^4.0.0","rollup":"^4.6.0","vitest":"^1.1.3","tsd":"^0.30.0","typescript":"^5.3.2"},"keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"_id":"toad-cache@3.7.0","gitHead":"6f983ce5592c6da5ec961412f8dcf864a78808c3","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==","shasum":"b9b63304ea7c45ec34d91f1d2fa513517025c441","tarball":"https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.0.tgz","fileCount":7,"unpackedSize":49551,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcNe8NO5yUjz+sAx1afICoppFCb/+UQ7FepgTiv6EURgIgYb45ultkgGLNkPNzw78l+a29YiDqV9GZqUZ2BkEvwR4="}]},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toad-cache_3.7.0_1704808083886_0.46370486502754815"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-02T16:58:25.288Z","1.0.0-next1":"2023-04-02T16:58:25.517Z","modified":"2024-01-09T13:48:04.218Z","1.0.0-next2":"2023-04-02T17:01:52.291Z","1.0.0-next3":"2023-04-02T17:05:18.587Z","1.0.0-next4851":"2023-04-02T17:10:29.972Z","1.0.0":"2023-04-02T17:38:02.279Z","1.1.0-next1":"2023-04-08T12:08:20.322Z","1.1.0-next2":"2023-04-08T13:30:48.391Z","2.0.0-next1":"2023-04-08T13:45:30.311Z","2.0.0-next2":"2023-04-08T13:49:06.109Z","2.0.0":"2023-04-08T14:04:28.245Z","2.1.0":"2023-04-08T14:15:58.458Z","3.0.0-next1":"2023-04-09T13:23:54.718Z","3.0.0-next2":"2023-04-09T13:37:50.073Z","3.0.0":"2023-04-09T13:47:26.051Z","3.0.1":"2023-04-09T15:03:21.455Z","3.0.2":"2023-04-25T09:05:59.192Z","3.1.0":"2023-05-20T17:55:38.089Z","3.1.1":"2023-05-20T18:05:38.480Z","3.1.2":"2023-05-20T18:25:20.084Z","3.2.0":"2023-05-25T07:59:46.058Z","3.3.0":"2023-10-03T11:19:23.163Z","3.3.1-RC1":"2023-11-29T21:24:27.064Z","3.3.1-RC2":"2023-11-29T21:25:17.665Z","3.3.1-RC3":"2023-11-29T21:26:04.437Z","3.3.1-RC4":"2023-11-29T21:27:04.296Z","3.3.1-RC5":"2023-11-29T21:27:48.975Z","3.3.1-RC6":"2023-11-29T21:36:37.164Z","3.3.1-RC7":"2023-11-29T23:06:34.859Z","3.3.1":"2023-11-29T23:19:31.466Z","3.4.0":"2023-12-06T17:23:17.756Z","3.4.1":"2023-12-06T17:33:15.514Z","3.5.0":"2024-01-08T16:07:19.401Z","3.6.0":"2024-01-09T12:03:38.712Z","3.7.0":"2024-01-09T13:48:04.035Z"},"maintainers":[{"name":"kibertoad","email":"iselwin@gmail.com"}],"description":"LRU and FIFO caches for Client or Server","homepage":"https://github.com/kibertoad/toad-cache","keywords":["LRU","FIFO","cache","client","server","least","recently","used","first","browser"],"repository":{"type":"git","url":"git://github.com/kibertoad/toad-cache.git"},"author":{"name":"Igor Savin","email":"kibertoad@gmail.com"},"bugs":{"url":"https://github.com/kibertoad/toad-cache/issues"},"license":"MIT","readme":"# Toad Cache\n\n[![NPM Version](https://img.shields.io/npm/v/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n[![NPM Downloads](https://img.shields.io/npm/dm/toad-cache.svg)](https://npmjs.org/package/toad-cache)\n![](https://github.com/kibertoad/toad-cache/workflows/ci/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/kibertoad/toad-cache/badge.svg?branch=main)](https://coveralls.io/r/kibertoad/toad-cache?branch=main)\n\nLeast-Recently-Used and First-In-First-Out caches for Client or Server.\n\n## Getting started\n\n```javascript\nimport { Lru, Fifo } from 'toad-cache'\nconst lruCache = new Lru(max, ttl = 0)\nconst fifoCache = new Fifo(max, ttl = 0)\n```\n\n## clear\n\n### Method\n\nClears the contents of the cache\n\n**Example**\n\n```javascript\ncache.clear()\n```\n\n## delete\n\n### Method\n\nRemoves item from cache\n\n param {String} key Item key\n\n**Example**\n\n```javascript\ncache.delete('myKey')\n```\n\n## deleteMany\n\n### Method\n\nRemoves items from cache\n\n param {String[]} keys Item keys\n\n**Example**\n\n```javascript\ncache.deleteMany(['myKey', 'myKey2'])\n```\n\n## evict\n\n### Method\n\nEvicts the least recently used item from cache\n\n**Example**\n\n```javascript\ncache.evict()\n```\n\n## expiresAt\n\n### Method\n\nGets expiration time for cached item\n\n param {String} key Item key\n return {Mixed} Undefined or number (epoch time)\n\n**Example**\n\n```javascript\nconst item = cache.expiresAt('myKey')\n```\n\n## first\n\n### Property\n\nItem in \"first\" or \"bottom\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.first // null - it's a new cache!\n```\n\n## get\n\n### Method\n\nGets cached item and marks it as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String} key Item key\n return {Mixed} Undefined or Item value\n\n**Example**\n\n```javascript\nconst item = cache.get('myKey')\n```\n\n## getMany\n\n### Method\n\nGets multiple cached items and marks them as recently used (pushes to the back of the list of the candidates for the eviction)\n\n param {String[]} keys Item keys\n return {Mixed[]} Undefined or Item values\n\n**Example**\n\n```javascript\nconst item = cache.getMany(['myKey', 'myKey2'])\n```\n\n## keys\n\n### Method\n\nReturns an `Array` of cache item keys.\n\n return {Array} Array of keys\n\n**Example**\n\n```javascript\nconsole.log(cache.keys())\n```\n\n## max\n\n### Property\n\nMax items to hold in cache (1000)\n\n**Example**\n\n```javascript\nconst cache = new Lru(500)\n\ncache.max // 500\n```\n\n## last\n\n### Property\n\nItem in \"last\" or \"top\" position\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.last // null - it's a new cache!\n```\n\n## set\n\n### Method\n\nSets item in cache as `first`\n\n param {String} key Item key\n param {Mixed} value Item value\n\n**Example**\n\n```javascript\ncache.set('myKey', { prop: true })\n```\n\n## size\n\n### Property\n\nNumber of items in cache\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.size // 0 - it's a new cache!\n```\n\n## ttl\n\n### Property\n\nMilliseconds an item will remain in cache; lazy expiration upon next `get()` of an item\n\n**Example**\n\n```javascript\nconst cache = new Lru()\n\ncache.ttl = 3e4\n```\n\n## Hit/miss/expiration tracking\n\nIn case you want to gather information on cache hit/miss/expiration ratio, as well as cache size and eviction statistics, you can use LruHitStatistics class:\n\n```js\nconst sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache\n\nconst cache = new LruHitStatistics({\n cacheId: 'some-cache-id',\n globalStatisticsRecord: sharedRecord,\n statisticTtlInHours: 24, // how often to reset statistics. On every rotation previously accumulated data is removed\n max: 1000,\n ttlInMsecs: 0,\n})\n```\n\nYou can retrieve accumulated statistics from the cache, or from the record directly:\n\n```js\n// this is the same\nconst statistics = sharedRecord.getStatistics()\nconst alsoStatistics = cache.getStatistics()\n\n/*\n{\n 'some-cache-id': {\n '2023-04-06': {\n cacheSize: 100, // how many elements does cache currently have\n evictions: 5, // how many elements were evicted due to cache being at max capacity \n expirations: 0, // how many elements were removed during get due to their ttl being exceeded\n hits: 0, // how many times element was successfully retrieved from cache during get\n emptyHits: 0, // out of all hits, how many were null, undefined or ''?\n falsyHits: 0, // out of all hits, how many were falsy? \n misses: 1, // how many times element was not in cache or expired during get\n invalidateOne: 1, // how many times element was invalidated individually\n invalidateAll: 2, // how many times entire cache was invalidated\n sets: 0, // how many times new element was added \n },\n },\n}\n\nNote that date here reflects start of the rotation. If statistics weren't rotated yet, and another day started, it will still be counted against the day of the rotation start\n*/\n```\n\n## License\n\nCopyright (c) 2023 Igor Savin\n\nBased on [tiny-lru](https://github.com/avoidwork/tiny-lru), created by Jason Mulligan\n\nLicensed under the MIT license.\n","readmeFilename":"README.md"}