{"_id":"@cadienvan/timed-cache","_rev":"5-f3ec1d6305235830db67bd1b877d0f00","name":"@cadienvan/timed-cache","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@cadienvan/timed-cache","private":false,"version":"0.0.1","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"prepublish":"tsc","devDependencies":{"tsc":"^2.0.4"},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","gitHead":"4405ce79be7ee918d257c0f934c63b99d0ddfa3d","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ohwaJvIsyWZXBtorcYGGX0W/FVrTFAp7uDJpu5dXRFJ8Kz53HsDsLgGRLhqts3dO37KSK55uv5nb+HgZfRuXDg==","shasum":"7ea26702a4a4333cfe440ac546995c8704ed45fc","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.0.1.tgz","fileCount":7,"unpackedSize":22787,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDXl8PB1VtpJ6eN37aps9+anCtTb/BkPmN5mM6FaeYKAiEAw/sM/0zcNfHhjGh3XlfQ64lU/tx7MoZ15+1teQ+Mrb4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOEuxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrsxg//WHRJOLDqHX2PsWoxjOjH3ruG9deH2yq8PJjLFSrIkhtabdsy\r\nyVLo4A2LrDSnAq839SNNQwmOWdkbFbuh5Wi18oB2GlO8mG35uxgoJHxfImUc\r\n/v0846h0QPPLKalk2eJVcxxAbPUqkY9UZruV2hnZKRATmsikIuTqLCTaSjBr\r\nHmuMQopZYcp2ynThSHhZWuKHpZZexYh+OASFicNF/0cPSqW1RxGitlJm9b0R\r\nj2BlRTpxQPW8tq7pnd2sEew/sZNjgQz99jQIe9rQXeakZRzWoZY+rnKMpmwv\r\ncHzXQbaI15ichk7J2N/zwax9g0m+Mf1zD4R/yhp4Nt0qdfaPpegFjApE13aQ\r\neuGi6GQUPwjYrmfMfjTxvDlWLjD6GYqGCaEd4qs1KmfKQ1kEKAIsxK4eyaHj\r\nD6+g+d5a4biaDK0PC0jn1v2XNNZ4zGzMs5GFm8H9M4R33C+rKml5b9O65Y0g\r\nrvmJ4gaSbSpDmSZAO9y4L2Sympr8jZ3dUnGiwOcVzWzzNZJA/kw/YiMI0CXl\r\n5Fe6neZ2/avljSSR8GPIaGYB1dA+Te2nqlZ1Dv6mE0vJYziAD26tipTY4sf3\r\n+OG2yBBx65fDrQbvMQTLWMmVU4UbtyKxtvvJSGximID2Gpkqzk9Fqbga0DEq\r\ndCPc38z7OQRfxx2JV3j/HMeC9RjIbtvdbvs=\r\n=/sX0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.0.1_1664633776839_0.31706360483766094"},"_hasShrinkwrap":false},"0.0.2":{"name":"@cadienvan/timed-cache","private":false,"version":"0.0.2","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"prepublish":"tsc","devDependencies":{"tsc":"^2.0.4"},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","gitHead":"ad452ce4f0a9283a8b2908a1cab91df6182937a4","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.0.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-+rlFs6oB92Fqj1NjhBaz1c4JfgXW2rX0NV/oMF9GnNFWIF6gJ5qk0W36alGWyCy04n+VUN/GQZEimd4XYNrKIA==","shasum":"85f4ebdad995e63ad857a686ddd74357799c04f1","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.0.2.tgz","fileCount":7,"unpackedSize":22909,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSvaO1H3soWhVyZm2pNcvP6lUZ2Mf7b8NoH1Bf051sfwIgIYdhOZAP69lbZ38pqWoGIC50Q+VYLowQbSS4PA4TcEo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOFIyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4vA//WijCVolWcLbR5DXo7lUrBKp2oynAdXXg1q/vq9YsDBmYapfr\r\nM0SCeOxiMfirwmnTvtisxbtrgdo6P/DYTeQJyQZmF7uNVeQBDdpv45Rrd+/L\r\nhxZkenIz5Nd9CdyTQJwGr4NfmLSUjKjtGrVcpRtd6uGvWFpDgC5sTjA+iWad\r\nu49Wfh/vvcja6IgOJkFiSn9a26kDkdJEPccprWrWqCvk/QQ8R4AVI1E+4cR5\r\nbuf2k1kmDdLOqqdxQPRm09lEx3oLHOaBz23dZjaj2qTUUlHNlPgwkMS5F/mx\r\nMFTASGGS6tYOi3xk9ibE6lq6TD+CqQfThCY/Pqqt+cqdfsRI8XGFPUIfCk7c\r\n06Yw9Yg+IwLw5e70K61W8tPk9YEtDSZ0Xg0Qwqvh1lcGoJHimt9Tkx4D56Ra\r\n2kPuBXvQTbYwwGPIXjukOpgFI9xE0yLNhPXqxyZH95DhndkcizR0ubKNQC9x\r\nZzAgox4mVdg1G7/4Qi0VMWVnrQAUYb8uGYdMu+9tn3Bgq/y1/lIasiK4Rp/Y\r\n8mQc9HCB4lqI6k59sAMiYMd3k60W9z9kzHY7ywkFnLAmbO0/rg0pwH5j+xP5\r\nV2mMRVQdRVLYoYuh1JSUmWgGBJjynkGDyofEj9YU35qY86Bf00JPfTZZtVU5\r\nBRiHlBUl8aIrql/k+bNMdg70Ai4i/1BZ2No=\r\n=uty0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.0.2_1664635441923_0.8890122482809153"},"_hasShrinkwrap":false},"0.0.3":{"name":"@cadienvan/timed-cache","private":false,"version":"0.0.3","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"prepublish":"tsc","devDependencies":{"tsc":"^2.0.4"},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","gitHead":"19f517ec82798ed595f4822017e2114d6ebe2418","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.0.3","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-/scSXDVq3kz4GWcGvJgtF7htiIUbsZZka57Vu6YYRDwaJxCujdxGztc4R5dNYYKtKQB9MkRtrEFG6tg6I5mWcA==","shasum":"51ddcc6d88ceb27cc23f0b91aeab5a33e9f91c94","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.0.3.tgz","fileCount":7,"unpackedSize":22740,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFzU/2EhUJK7CGSOLa3TOemmmDhUi4UddSc1RPfCEjdAIhAKQWG9nLC2rAYE9VSaFC1H5rHrFcb54uBdw0WdtKD5vt"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU+VoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmro9w//b5fZai79HQmjtjHwIS697gQ7biovZ0v8vDoH8c38GBknbzTo\r\n0YQfk0a52elJ2kRaOuxvOKG2uSkCDwEAJSinrW/+LmtNFk/ebXwwEkTjhK3p\r\nZ/lHUAk1XlB3VawdrpM42rBHQZDOP5TtJLITaQ2/Kf2nIgv9pvpruWsCqVrX\r\nDHJowYNdR1jl3nxS0vMgPgZR6dKbLwOtT2zdF4GPMs7EVzU3UbvdUIZirZnT\r\nZ9N8qv1/FsShR87rX9I4KwGuJouHFRgnL45H8pl+Wi9bZ2nxYLRLyXxW1TSu\r\nk/QUzOcdqOnTzuOFivN0DQMcciVdjo34BgNli9Es0QH6iQr5Ewv6R+92EBEH\r\nAMPP0FLfRmHmAKj6cQsRr7ONMGnoH8392JcReW6+Egaw/5U5CWt4ZkU6GTds\r\nJdon0NpU0OaEomrZtH8BbHurZmtjTDLOIhfeNnfZz/DSJ4uwc3xpDax6S81p\r\nQpoVmuI2DMGjc/nI3GQogNGlzz/QcxjZ7ZuBzaA+nGjzAJA0R2HZfCjhFd0R\r\nfty8fY5ND0DBu41jzgj3bi/+mE1NalnW+pTrUd3z2PZ3KL5vHykYVamc+WJK\r\nSWMcYl53aWsCoJu15e+vnZuqGTtwqN7BLaJkslMydp+ZFv1c+r/UGo9WZIot\r\nYeZOnPH+BEQBTnHmz1LOhg5w0muTnVIeKkk=\r\n=WBwk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.0.3_1666442600144_0.7968115248333423"},"_hasShrinkwrap":false},"0.0.4":{"name":"@cadienvan/timed-cache","private":false,"version":"0.0.4","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"prepublish":"tsc","devDependencies":{"tsc":"^2.0.4"},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","gitHead":"c07a81a73982100c17325c0f52cf02ce9f0768eb","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.0.4","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Mhr9dc/2O01zeDY6r25W0BSjDScq3jJe2Rm88khsvKJO7XkkuoJcNVDcUG50PXixFbAOYEs+nePtpLYsJHe+Zw==","shasum":"a3b1e23aae5bc0a9932e78d6d11c4b0292c4c9a8","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.0.4.tgz","fileCount":7,"unpackedSize":22952,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxXDPhCLFdj+bnHEkPouZVFk6ncgo+pHfsm6HKxN/yXgIgYOwxNt98DkIfcBrtlgL+SfTQ1EXGw2+EnqqvDYGaoJs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU+t6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbvBAAjHgRFnyPtBDQlX8z7MLl4Rc7TFaiM0pPoOen86WjzJgTkA0D\r\nLSGkAWLcEBFsnNtKHwQVIhkDH6JCykmSKHl+awJtedNmIOSBnOx+5ZYerHpr\r\n+WVNRdACRqBIdt4oyLr9XmKOWv67TB+NDcx9uFp9mh7X/qI0LDloBwEyUzot\r\n3HuEjMp38LoTUQI0us7OyAwEHtCD1RqIYXXos9TExr48kUMsXHkUhPhwzq1H\r\nUhF0orSecRQTf9nJdAGsMpi6MXkOmUDhdBGGXTOw5OSt5Qurepni/a0HJ9TA\r\nB4IX8XHu7xkEbs+LV3rQ2M6aKKWSCH7JPaho7k3o1JDFvCmGSDRLvIg4fx6W\r\n6hVlxpcvd7yixKpjTxwR3gGkJtiR2BRXdojEdrFtJiB0bp58ECYw4DBQMdox\r\neHRqK7Up3G2qP9ZF9YlKYYbs2PhrIzjQjDsQg1bmLwl/MqkZQHuIlaajcMGK\r\nL9hhl9BJijGJDRzmzmvovzs7Kp5u/erWofj6b7Vb5AH/bOdk4omJZXXbMGXc\r\nfCT3ExE7B8L+Ky6F6CBqwfBzzYq5MHov/INsgmbYc5/cuz6THtScbwXv/UC0\r\nHvqXOHw1HdWwhM1CkPxXOLAtrNDCNTklG5/PIunExL2ZqRQTopYOaxaWtwYr\r\ntBV6JoWIYYK5REz7mOqHL/q9Z42d4b+ebyc=\r\n=82z2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.0.4_1666444154436_0.5892500214250243"},"_hasShrinkwrap":false},"0.1.0":{"name":"@cadienvan/timed-cache","private":false,"version":"0.1.0","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"ts-types":" tsc --emitDeclarationOnly --outDir dist","check":"npm run prettier && npm run lint && npm test","build":"npm run check && rimraf dist && NODE_ENV=production node esbuild.js && npm run ts-types","demo-test":"for file in demo/*.js; do node $file; done","prettier":"prettier --write .","lint":"eslint . --ext .ts","dev":"jest --watch","test":"jest --no-cache","release:common":"npm run build && git push --follow-tags origin main && npm publish --access public","release:patch":"npm version patch && npm run release:common","release:minor":"npm version minor && npm run release:common","release:major":"npm version major && npm run release:common"},"prepublish":"npm run build","devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","@types/jest":"^29.2.4","@types/node":"^18.11.12","@typescript-eslint/eslint-plugin":"^5.46.0","@typescript-eslint/parser":"^5.46.0","esbuild":"^0.16.4","eslint":"^8.29.0","husky":"^8.0.2","jest":"^29.3.1","lint-staged":"^13.1.0","prettier":"^2.8.1","rimraf":"^3.0.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"lint-staged":{"src/**/*.{js,jsx,ts,tsx}":["npx prettier --write","npx eslint --fix"]},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","author":{"name":"Michael Di Prisco","email":"cadienvan@gmail.com"},"gitHead":"d4e0439c426a060c645d27eae1359b60a4ef83ee","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.1.0","_nodeVersion":"14.16.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-jCSwrwNnI3gKOA1xS57tekTVI3HzY41llqdult//+wvZ6XMO/lU51TbTDrQDCQ3JP9+YTmNtrTRxF7hH79rWow==","shasum":"587d19f6432c42be9d71299c85d75d6476f8e793","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.1.0.tgz","fileCount":5,"unpackedSize":8717,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHK4wmwNuoRFYUmNNUBHsDEftVbKfkjlUcjGCwRhrsm7AiEA6FhsShPm+/xDYV/W37IAuXOYyDoYmI54gz6Gejz+y8w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlNpyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIVA//RkdG1qYEv3owXK1ljpRirLprSTCDmSnoQUKHGixC/uPtqZ2k\r\nx+n0tIJd4wU6UoKcmjYR96WhPIzNQqD7zlgEcgXkkVc79h1c9tzKJL2S1IsP\r\nkFHRuj7tEa/LdtLlT7T5T1o79slpasMOsLgbJXaMEcUwuZ/HGgu20BfLOzX9\r\nXr5dsWVudHYRvxt+9YbWZhf2gAWYn6iXOcUmRKuPnBIdFpElZDhdMazjypYS\r\nKTMxLo+liEN3rmXXFHL5Cb87yZg8cmrFHxhJCfkJu2PpjOULcgBu/67GrcUU\r\nlcz9g76uMvjayHnW0zVq98BFm+K6LTgXjMUPfZLo0mUlvNFP7I5bLSpxugAx\r\nEBnivd9tDBsm1ilQUSha27UO57hJHbWcVn+JN3U5996N/jIrxmmoe4ihbFuN\r\n6jH4JDSdKyc/G0zkE2SszSEMuEWsbzlvZy2Mi3OHEMSXYNlfoMhzCC7dLMyk\r\njMYLswy7LLNri+cov/vfAT5KWvRsbg5WvRIr5NC5ZM8vjVt9LIvyeRP+iYxf\r\nB6CB0MWHI9MvMDzmvyvnBv3SPWZgnAPT8dFy604F1OumAHRCd5WmxFKZCBYl\r\nNfj64oM3Z6R006B4ZnGtWT+jbJlGFOMOM/+QNwYmXFYvO3ve7Fw5dHYDeAKl\r\naV+MgECIqPhkdOO45PV/6dOmAhiL0BabHmo=\r\n=q1CX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.1.0_1670699634081_0.8570535025265547"},"_hasShrinkwrap":false},"0.1.1":{"name":"@cadienvan/timed-cache","private":false,"version":"0.1.1","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"ts-types":" tsc --emitDeclarationOnly --outDir dist","check":"npm run prettier && npm run lint && npm test","build":"npm run check && rimraf dist && NODE_ENV=production node esbuild.js && npm run ts-types","demo-test":"for file in demo/*.js; do node $file; done","prettier":"prettier --write .","lint":"eslint . --ext .ts","dev":"jest --watch","test":"jest --no-cache","release:common":"npm run build && git push --follow-tags origin main && npm publish --access public","release:patch":"npm version patch && npm run release:common","release:minor":"npm version minor && npm run release:common","release:major":"npm version major && npm run release:common"},"prepublish":"npm run build","devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","@types/jest":"^29.2.4","@types/node":"^18.11.12","@typescript-eslint/eslint-plugin":"^5.46.0","@typescript-eslint/parser":"^5.46.0","esbuild":"^0.16.4","eslint":"^8.29.0","husky":"^8.0.2","jest":"^29.3.1","lint-staged":"^13.1.0","prettier":"^2.8.1","rimraf":"^3.0.2","ts-jest":"^29.0.3","typescript":"^4.9.4"},"lint-staged":{"src/**/*.{js,jsx,ts,tsx}":["npx prettier --write","npx eslint --fix"]},"repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"license":"MIT","author":{"name":"Michael Di Prisco","email":"cadienvan@gmail.com"},"gitHead":"8dc89e981039efec6109bb0a5483e89f304b8feb","description":"A simple in-memory time-based cache for both objects and function execution.","bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"homepage":"https://github.com/Cadienvan/timed-cache#readme","_id":"@cadienvan/timed-cache@0.1.1","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-Kv8G4UOfHaFuVS/3ksFhJQjGKKjVc25ccrM2VqvmVdL6WATN1iUaBHvbMB9HuTJ76D9pcpRywgWZQkOce3DISw==","shasum":"d6d9cfc47f88ce3844a5bfbd537930cdbbbc8907","tarball":"https://registry.npmjs.org/@cadienvan/timed-cache/-/timed-cache-0.1.1.tgz","fileCount":5,"unpackedSize":8717,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIByQTopbT14HQPCjU1GsI88ZpT0dDbkK0fEcG35VGbjrAiEAzTBode8l9EsnmuYndysOWl04LojQCth+z4MNbS8Xju4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQ/zOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG9BAAgvRHtEVMOBePTwb946U0/jOA+XbTGxs8FrOlsnmzvFRJO1RV\r\ndqSqAzt56/ItgIktslB1+a4q4ZQSkOP94wU7jJl0Mq4x9Itx0AtNw9TqFXVj\r\n4RdIzyVyTal2FNPSIBmR7QDDGtjUmL77hRidEVMzaZEBIOMFmWQvFBQzrLT+\r\nxapSZZnYFF+hWaD6EcH0u+39dSpALAvcwesIaN2FWlNYoxXt8ZoruAFjQtOK\r\n+uCBz2Eovs/yQoL3A4yIaBA9VP7w8yCUop+irWHGAKQ7brcb7vfsYdQiLLaI\r\nZAG7XtK6vLk6KiLx6A02ySUHALKnHglVGMe9x8l/cHc/Xj9roKKZRJEr26Mt\r\nZ+oqbiweLaTlptGpj6ikL16ERfC86w72wqQnQMzoMqlhxRH4EYIKsB00SRzs\r\n9zxp3Bh9onDlLfV7dA/D1c0bxPTydtB0DxPsVkqaldIRMYzIN1OsY6AKkNgi\r\n31TFnOf+kDWYW+q9DYxqxpVU5KTZlAQEx5XYhMdgZYSFAIcrAJb7WrvftV4G\r\nsN9sVnluSB5hN5zj2TEDUVzSvSUPvZYVqpwMUUg9rqggo2DrzvC5IwL1ycsf\r\nOyerki+lR/ZrA1KypYls2ZOsVJgCYldNoXL/RHMKNRLBb1OKilkngdTnWD1K\r\nIJtKhChcTDaW/oo/laFK5TljbddKOCv22zI=\r\n=q4tO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cadienvan","email":"cadienvan@gmail.com"},"directories":{},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-cache_0.1.1_1682177230183_0.22072576443582537"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-01T14:16:16.779Z","0.0.1":"2022-10-01T14:16:17.035Z","modified":"2023-04-22T15:27:10.463Z","0.0.2":"2022-10-01T14:44:02.169Z","0.0.3":"2022-10-22T12:43:20.298Z","0.0.4":"2022-10-22T13:09:14.641Z","0.1.0":"2022-12-10T19:13:54.239Z","0.1.1":"2023-04-22T15:27:10.359Z"},"maintainers":[{"name":"cadienvan","email":"cadienvan@gmail.com"}],"description":"A simple in-memory time-based cache for both objects and function execution.","homepage":"https://github.com/Cadienvan/timed-cache#readme","repository":{"type":"git","url":"git://github.com/Cadienvan/timed-cache.git"},"bugs":{"url":"https://github.com/Cadienvan/timed-cache/issues"},"license":"MIT","readme":"# What is this?\n\nA simple in-memory time-based cache for both objects and function execution.\n\n# How do I install it?\n\nYou can install it by using the following command:\n\n```bash\nnpm install @cadienvan/timed-cache\n```\n\n# Why did you build it?\n\nI needed a simple cache for a function that was being called repeatedly with the same arguments. I wanted to cache the results for a certain amount of time, and then re-run the function when the cache expired.\n\n# How can I use it?\n\nYou can import and instance a new TimedCache object as follows:\n\n```js\nimport { TimedCache } from '@cadienvan/timed-cache';\nconst cache = new TimedCache();\n```\n\nLook at the `demo` folder in the GitHub Repository in order to have some proofs of concept considering both synchronous and asynchronous functions.\n\n# Does it support async functions?\n\nYes, it does. You can use it with both synchronous and asynchronous functions.  \nLook at the `demo` folder in the GitHub Repository for an example.\n\n# Which parameters are available?\n\nYou can pass a parameter to the TimedCache, which defines the amount of items the cache can contain. If you don't pass any parameter, the cache will contain 100 elements.  \nAs soon as a new element is added to the cache, the oldest one will be removed.\n\n# How can I add an element to the cache?\n\nYou can add an element to the cache by using the `set` method.\n\n```js\ncache.set('key', 'value');\n```\n\n# How can I retrieve an element from the cache?\n\nYou can retrieve an element from the cache by using the `get` method.\n\n```js\ncache.get('key');\n```\n\n# How can I remove an element from the cache?\n\nYou can remove an element from the cache by using the `delete` method.\n\n```js\ncache.delete('key');\n```\n\n# How can I clear the cache?\n\nYou can clear the cache by using the `clear` method.\n\n```js\ncache.clear();\n```\n\n# How can I get the size of the cache?\n\nYou can get the size of the cache by using the `size` property.\n\n```js\ncache.size;\n```\n\n# How can I get the keys of the cache?\n\nYou can get the keys of the cache by using the `keys` method.\n\n```js\ncache.keys();\n```\n\n# How can I get the values of the cache?\n\nYou can get the values of the cache by using the `values` method.\n\n```js\ncache.values();\n```\n\n# How can I get the entries of the cache?\n\nYou can get the entries ([key, value] pairs) of the cache by using the `entries` method.\n\n```js\ncache.entries();\n```\n\n# How can I iterate over the cache?\n\nYou can iterate over the cache by using the `forEach` method.\n\n```js\ncache.forEach((value, key) => {\n  console.log(key, value);\n});\n```\n\n# How can I check if an element is in the cache?\n\nYou can check if an element is in the cache by using the `has` method.\n\n```js\ncache.has('key');\n```\n\n# How can I get the time to live of an element?\n\nYou can get the time to live of an element by using the `ttl` method.\n\n```js\ncache.ttl('key');\n```\n\n# Does the class support key-based expiration?\n\nNo, it doesn't. You can use the [@cadienvan/key-value-cache](https://github.com/Cadienvan/key-value-cache) library in order to achieve this.\n\n# How does it work under the hood?\n\nThe cache is a simple object that stores the results of a function call in memory leveraging the `Map` constructor.  \nThe cache is time-based, so the results are only valid for a certain amount of time. If the cache expires, the wrapped object / functions is re-run and the results are cached again.\n\n# ToDo\n\n- [ ] Add tests\n","readmeFilename":"README.md","author":{"name":"Michael Di Prisco","email":"cadienvan@gmail.com"}}