{"_id":"@akashbabu/lfu-cache","_rev":"4-ae6b41ae68575f2743ef19a6879180b7","name":"@akashbabu/lfu-cache","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@akashbabu/lfu-cache","version":"1.0.0","description":"LFU cache implementation with a complexity of `O(1)` for all transactions","sideEffects":false,"main":"lib/lfuCache.js","unpkg":"dist/lfuCache.js","module":"es/lfuCache.js","typings":"types/src/index.d.ts","scripts":{"_test":"cross-env TS_NODE_FILES=true mocha --require ts-node/register test/**/*.spec.ts","_test:exit":"npm run _test -- --exit","test":"cross-env NODE_ENV=test npm run _test:exit","test:dev":"cross-env NODE_ENV=test npm run _test -- -w","test:grep":"cross-env NODE_ENV=test npm run _test -- -g ","coverage":"nyc npm run test","lint:fix":"tslint --fix --config tslint.json src/index.ts","lint":"tslint --config tslint.json src/index.ts","tsc:build":"tsc","rollup:build":"rollup -c","build":"npm run tsc:build && npm run rollup:build","pack":"npm run build && npm pack","status":"git status","coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls"},"engines":{"node":">=8"},"repository":{"type":"git","url":"git+https://github.com/AkashBabu/lfu-cache.git"},"keywords":["lfu","lru","cache","fast","O(1)","typescript"],"author":{"name":"001akashbabu@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AkashBabu/lfu-cache/issues"},"homepage":"https://github.com/AkashBabu/lfu-cache#readme","precommit":["lint:fix","lint","coverage","build","status"],"nyc":{"extension":[".ts"],"exclude":["**/*.d.ts"],"include":["src/**/*"]},"devDependencies":{"@babel/core":"^7.7.2","@babel/preset-env":"^7.7.1","@babel/preset-typescript":"^7.7.2","@rollup/plugin-replace":"^2.2.1","@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.7.12","chai":"^4.1.2","cli-progress":"^3.3.1","coveralls":"^3.0.6","cross-env":"^6.0.0","delay":"^4.3.0","gitbook-cli":"^2.3.2","mocha":"^5.2.0","nodemon":"^1.19.3","nyc":"^12.0.2","pre-commit":"^1.2.2","radargun":"^1.0.1","rimraf":"^2.6.2","rollup":"^1.26.5","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","rollup-plugin-typescript2":"^0.25.2","source-map-support":"^0.5.13","ts-node":"^8.0.2","tslint":"^5.20.0","typedoc":"^0.15.0","typedoc-plugin-markdown":"^2.2.11","typescript":"^3.6.4"},"dependencies":{"@akashbabu/node-dll":"^2.0.1"},"npmName":"lfu-cacher","npmFileMap":[{"basePath":"/dist/","files":["*.js"]}],"gitHead":"09b32733943aa78d299b8dc9577a70b9d17302ba","_id":"@akashbabu/lfu-cache@1.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mpfMFcGbjeO3nMVEf4CwmtJMOvU4xm6LxBUQiFWSkk7/8w7Ez/Kfx4AAk/d7NYDFL5HeCzruXX04I38IMam2UQ==","shasum":"5a34008c94b49972783cb1e717e6186e049d3119","tarball":"https://registry.npmjs.org/@akashbabu/lfu-cache/-/lfu-cache-1.0.0.tgz","fileCount":20,"unpackedSize":91297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/xQYCRA9TVsSAnZWagAAZ08P/iN28MJWHki+F8NFy1Wz\n90m8y2RmGeR4ayoPEW8C2hkuSrxafIW60rsyFXkV01UT2Fyo8nLsgDe97TMR\nNFrTc0mkLvtHO03RrP51jpYXSq6p05nAMVFhiONSsYvSi7YAusp6riA/NIpG\n54dUEpmKXOqmW6RFfMEbpveaIUjV1jBxgLo5kCTRcBXRV4NADx1GiEOwDH7Q\n3e7/19orT5jqLRkUwnbvWoSpQboxgBq8wYeglTzshelgxzehIpW+/UZDoiIC\n91FTfUPhz/Uzm/Z8OMtsARAb7XiqvrCk2uR+8rAgoP52TrMplyZD5gcrLj+G\nXUytZLdWm240LC99ACMrvp2M8MOJM+5iB09F6uiV0X6CRWTHmeLXmL1bqaCS\n8GENFg0gtfIMue4tHx/4UHAfci59Mz4jvgkFLbUVh3sAd6yEy67VXzAoUT94\nWOhbxEwIv9oe8LOtJ2aFIndgekjQrGmR6nKgoSr02ua4EKJN8yQxIl3nx9QL\nADfjqRq2QJSP0FXjv9YBDm54kQWk0Qp8BiXcbKV05RxAMXRvilaNiDjfC+4T\nipS+PbXAjXhU2Sqgvipt1CkWu46j7LkohB2TpdfXNnpKkdlqnDsN7ezZW6SY\ng/C4lz0j1pHP6+PdSK5ZHXMqpsXPY4BTdCENidIMoUWAG2Zk5cypiqwaxrr8\nl2Zc\r\n=IgyR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPc+tbN/kNLQ62FFRWTS+n1kfR5+GwwbIR4U/RDpT8jAIhAPnzzi84bNpXMYErqhsSgVp5lDpYpX2/9C0kjS59Smb8"}]},"maintainers":[{"name":"akashbabu","email":"001akashbabu@gmail.com"}],"_npmUser":{"name":"akashbabu","email":"001akashbabu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lfu-cache_1.0.0_1576997911797_0.6793996109501168"},"_hasShrinkwrap":false},"1.0.1":{"name":"@akashbabu/lfu-cache","version":"1.0.1","description":"LFU cache implementation with a complexity of `O(1)` for all transactions","sideEffects":false,"main":"lib/lfuCache.js","unpkg":"dist/lfuCache.js","module":"es/lfuCache.js","typings":"types/src/index.d.ts","scripts":{"_test":"cross-env TS_NODE_FILES=true mocha --require ts-node/register test/**/*.spec.ts","_test:exit":"npm run _test -- --exit","test":"cross-env NODE_ENV=test npm run _test:exit","test:dev":"cross-env NODE_ENV=test npm run _test -- -w","test:grep":"cross-env NODE_ENV=test npm run _test -- -g ","coverage":"nyc npm run test","lint:fix":"tslint --fix --config tslint.json src/index.ts","lint":"tslint --config tslint.json src/index.ts","tsc:build":"tsc","rollup:build":"rollup -c","build":"npm run tsc:build && npm run rollup:build","pack":"npm run build && npm pack","status":"git status","coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls"},"engines":{"node":">=8"},"repository":{"type":"git","url":"git+https://github.com/AkashBabu/lfu-cache.git"},"keywords":["lfu","lru","cache","fast","O(1)","typescript"],"author":{"name":"001akashbabu@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AkashBabu/lfu-cache/issues"},"homepage":"https://github.com/AkashBabu/lfu-cache#readme","precommit":["lint:fix","lint","coverage","build","status"],"nyc":{"extension":[".ts"],"exclude":["**/*.d.ts"],"include":["src/**/*"]},"devDependencies":{"@babel/core":"^7.7.2","@babel/preset-env":"^7.7.1","@babel/preset-typescript":"^7.7.2","@rollup/plugin-replace":"^2.2.1","@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.7.12","chai":"^4.1.2","cli-progress":"^3.3.1","coveralls":"^3.0.6","cross-env":"^6.0.0","delay":"^4.3.0","gitbook-cli":"^2.3.2","mocha":"^5.2.0","nodemon":"^1.19.3","nyc":"^12.0.2","pre-commit":"^1.2.2","radargun":"^1.0.1","rimraf":"^2.6.2","rollup":"^1.26.5","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","rollup-plugin-typescript2":"^0.25.2","source-map-support":"^0.5.13","ts-node":"^8.0.2","tslint":"^5.20.0","typedoc":"^0.15.0","typedoc-plugin-markdown":"^2.2.11","typescript":"^3.6.4"},"dependencies":{"@akashbabu/node-dll":"^2.0.1"},"npmName":"lfu-cacher","npmFileMap":[{"basePath":"/dist/","files":["*.js"]}],"gitHead":"87e671f842e78c3dd8d27764ae730aaed446ab70","_id":"@akashbabu/lfu-cache@1.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Hxw+gfBoUAAWmruifzQDViokx7GSieMiEnuTwjvmffXjsoC77ur2rU+FEOrzGGD0gkAj75E+7KQGp8xnSdj5bg==","shasum":"5d1d38db344c0b013942c7f96c313d5b91946e01","tarball":"https://registry.npmjs.org/@akashbabu/lfu-cache/-/lfu-cache-1.0.1.tgz","fileCount":20,"unpackedSize":91394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCE8mCRA9TVsSAnZWagAAd1oP/2rrNkpr2MVfagDu3SUN\nO9Wb+eosHTqWHqloJYvI6NzV2p2cd2gUbtfYkTtCz95dml1KfRvsYAhc7Z/5\nQYyPbFLe4okS90m+4CT3Q4Xww6qIG/FvVCoRIU/kO2jRRkwr9i+JOJiaChii\ntnwbbLqN51OhAtL4us9mKwcwmZSBeykdyOULE+DvRq5amL9dJcgQNUGxVlbf\nNSdlShG5nX9Brrx6vLp5Ga8Km511gTBd7JKurbHE1BEhqCpl6SsR25Cu8L1V\n+86z9aKFZ9uXoymL+o/luyW/CcrVntvCBVAFfk+oHKt7uFTc4BxlN4n22ZPK\nY2PZ9plK/Sm+p0hJDawP3SpsGHZUI99zkq7CDP4clIZPa9uvu1ihcHpLEcNj\n3K3qLnYv9lu2QAVnlP+QA+rwg1VJfq00b8K1AoWt1lJEPSc9kN0RrRAMM6Mb\nPfQmSk8FpRKsP7lYL/cbUCK+4oAjOfA2zV+rXsJccEPb1lnH+P03ien89wwC\n7bBwrfPCsSJBQ9ej87KkmOkylKVfIGQYXJI03z9u0ZEnjIJTsK+cmTOT9Yz0\nFU/8ro7SSS3i6Z9f4rNiuK1xTgCjdlgZnBc6wCmNnxP3xdZfEaPFIEsm6hSC\nCOxf+t94H8Xn/l6PVpozlMs4jfFHVKvg0/nLyMMT+j8nBokTYIp0QOk/5xTo\nSkXN\r\n=ITBX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAfarKP7J7mGK0+fJuQXdIvO6ilyijosUqbSorI6LXBcAiEA9vUzOh4UQ4eZmNUGt86t0eISg8eTV7riux4qzXsFcos="}]},"maintainers":[{"name":"akashbabu","email":"001akashbabu@gmail.com"}],"_npmUser":{"name":"akashbabu","email":"001akashbabu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lfu-cache_1.0.1_1577602854284_0.5776403598143283"},"_hasShrinkwrap":false},"1.0.2":{"name":"@akashbabu/lfu-cache","version":"1.0.2","description":"LFU cache implementation with a complexity of `O(1)` for all transactions","sideEffects":false,"main":"lib/lfuCache.js","unpkg":"dist/lfuCache.js","module":"es/lfuCache.js","typings":"types/src/index.d.ts","scripts":{"_test":"cross-env TS_NODE_FILES=true mocha --require ts-node/register test/**/*.spec.ts","_test:exit":"npm run _test -- --exit","test":"cross-env NODE_ENV=test npm run _test:exit","test:dev":"cross-env NODE_ENV=test npm run _test -- -w","test:grep":"cross-env NODE_ENV=test npm run _test -- -g ","coverage":"nyc npm run test","lint:fix":"tslint --fix --config tslint.json src/index.ts","lint":"tslint --config tslint.json src/index.ts","tsc:build":"tsc","rollup:build":"rollup -c","build":"npm run tsc:build && npm run rollup:build","pack":"npm run build && npm pack","status":"git status","coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls"},"engines":{"node":">=8"},"repository":{"type":"git","url":"git+https://github.com/AkashBabu/lfu-cache.git"},"keywords":["lfu","lru","cache","fast","O(1)","typescript"],"author":{"name":"001akashbabu@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AkashBabu/lfu-cache/issues"},"homepage":"https://github.com/AkashBabu/lfu-cache#readme","precommit":["lint:fix","lint","coverage","build","status"],"nyc":{"extension":[".ts"],"exclude":["**/*.d.ts"],"include":["src/**/*"]},"devDependencies":{"@babel/core":"^7.7.2","@babel/preset-env":"^7.7.1","@babel/preset-typescript":"^7.7.2","@rollup/plugin-replace":"^2.2.1","@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.7.12","chai":"^4.1.2","cli-progress":"^3.3.1","coveralls":"^3.0.6","cross-env":"^6.0.0","delay":"^4.3.0","gitbook-cli":"^2.3.2","mocha":"^5.2.0","nodemon":"^1.19.3","nyc":"^12.0.2","pre-commit":"^1.2.2","radargun":"^1.0.1","rimraf":"^2.6.2","rollup":"^1.26.5","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","rollup-plugin-typescript2":"^0.25.2","source-map-support":"^0.5.13","ts-node":"^8.0.2","tslint":"^5.20.0","typedoc":"^0.15.0","typedoc-plugin-markdown":"^2.2.11","typescript":"^3.6.4"},"dependencies":{"@akashbabu/node-dll":"^2.0.1"},"npmName":"lfu-cacher","npmFileMap":[{"basePath":"/dist/","files":["*.js"]}],"gitHead":"6e20e8fdde452c3e80244fc442a301e2063a0a81","_id":"@akashbabu/lfu-cache@1.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1gh4vC6XEJKtNmyY6YIJbXz6vtvHvCF9phSMUTojyxmn+KWLq63QdXyJh//n6H4uYQfRZGjLcbwRp0Q969dAIg==","shasum":"1864bc688e6b3573513e63dee9e871563dcc347f","tarball":"https://registry.npmjs.org/@akashbabu/lfu-cache/-/lfu-cache-1.0.2.tgz","fileCount":20,"unpackedSize":95042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMOm+CRA9TVsSAnZWagAAAC0P/0PRqj35F+q37d1HlPIv\ntc733a0mtq4hVoF2yVSm1nD3hrgvNdCwcT2+Xif27X4WMP6I5O2hvGQbkK+e\n5aSHIi7gE49dsJiS3ZB6ZI02K1gZQipmVyfIGlW2AEDUDhENHQBgrtenqAQH\nMjpL39PlIfiJLu+rBxkWqwKcbU2elvyGW0EQFMXfvFpwGdWlMJXKsWvBUfbS\nJcWb2j+kMGiYrCKRooTQuZjRe321C5fpPNJk0JQTlI02XEkIF8TaovE0zHGo\nHUcujchQGTE+J8S9gzsTgHoCaYEppquh0CPOuSo8412/OGjC4ybJbsCPwEZb\nG3g36EH/Z3k9zHT/g6o9zBWPGxcXhLb+/ZyAuWvibqM8OHq8zAuU4EECeEBm\nbPfvVuMEOxxFa/lmgwOSAWnWJEJUq8oQnbDsaRCdCMem4sBIQc/lK9v0fMnV\nN49G45wy0ayrLd7Z/l/bXuV8Oz3QZ8vFkhlNWQHpyF3kaxTtyA4u80lVcoWb\nleLUKP346Y2w8Ur9AvV9qhmFgeJikNnh1vpKCEC3XdUqD6YXdsZqS2sG6BON\naBZ4LracGxh6T9WLZmf0Q6vWcqnaV1T7GBMj16tN9ijx9Y7w1RNQcVD2hW5u\n27a3jtMfElcW2OE4z6M4eLgvXJLn3PKsEehkdXDh7IlYc1rtWRpxRF5ZPxsV\nxVbU\r\n=B6kT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGSnkxU6qNUovesmJDGE/kat2EvhgZrwAWWOITiZQMHwIhAKzRlGcDPNW8RhRfesW4LLYwkDgRfGICMo+F9HrwC0+y"}]},"maintainers":[{"name":"akashbabu","email":"001akashbabu@gmail.com"}],"_npmUser":{"name":"akashbabu","email":"001akashbabu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lfu-cache_1.0.2_1580263869501_0.17328711708381261"},"_hasShrinkwrap":false},"1.1.0":{"name":"@akashbabu/lfu-cache","version":"1.1.0","description":"LFU cache implementation with a complexity of `O(1)` for all transactions","sideEffects":false,"main":"lib/lfuCache.js","unpkg":"dist/lfuCache.js","module":"es/lfuCache.js","typings":"types/src/index.d.ts","scripts":{"_test":"cross-env TS_NODE_FILES=true mocha --require ts-node/register test/**/*.spec.ts","_test:exit":"npm run _test -- --exit","test":"cross-env NODE_ENV=test npm run _test:exit","test:dev":"cross-env NODE_ENV=test npm run _test -- -w","test:grep":"cross-env NODE_ENV=test npm run _test -- -g ","coverage":"nyc npm run test","lint:fix":"tslint --fix --config tslint.json src/index.ts","lint":"tslint --config tslint.json src/index.ts","tsc:build":"tsc","rollup:build":"rollup -c","build":"npm run tsc:build && npm run rollup:build","pack":"npm run build && npm pack","status":"git status","coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls"},"engines":{"node":">=8"},"repository":{"type":"git","url":"git+https://github.com/AkashBabu/lfu-cache.git"},"keywords":["lfu","lru","cache","fast","O(1)","typescript"],"author":{"name":"001akashbabu@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AkashBabu/lfu-cache/issues"},"homepage":"https://github.com/AkashBabu/lfu-cache#readme","precommit":["lint:fix","lint","coverage","build","status"],"nyc":{"extension":[".ts"],"exclude":["**/*.d.ts"],"include":["src/**/*"]},"devDependencies":{"@babel/core":"^7.7.2","@babel/preset-env":"^7.7.1","@babel/preset-typescript":"^7.7.2","@rollup/plugin-replace":"^2.2.1","@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.7.12","chai":"^4.1.2","cli-progress":"^3.3.1","coveralls":"^3.0.6","cross-env":"^6.0.0","delay":"^4.3.0","gitbook-cli":"^2.3.2","mocha":"^5.2.0","nodemon":"^1.19.3","nyc":"^12.0.2","pre-commit":"^1.2.2","radargun":"^1.0.1","rimraf":"^2.6.2","rollup":"^1.26.5","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","rollup-plugin-typescript2":"^0.25.2","source-map-support":"^0.5.13","ts-node":"^8.0.2","tslint":"^5.20.0","typedoc":"^0.15.0","typedoc-plugin-markdown":"^2.2.11","typescript":"^3.6.4"},"dependencies":{"@akashbabu/node-dll":"^2.0.1"},"npmName":"lfu-cacher","npmFileMap":[{"basePath":"/dist/","files":["*.js"]}],"gitHead":"44477b2c378bdd77b84012b2b2bd27ef97d36708","_id":"@akashbabu/lfu-cache@1.1.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-d7s5WPY5owsdYGYT/pFfLdcC4dsyWgmApWxgczYV45n6+6+x7vPjWVo+KZDwxq/Je9y8/GUhxMq2hYriihr+GA==","shasum":"ff298474a97f75ede8063a1364ead1291b3b65a1","tarball":"https://registry.npmjs.org/@akashbabu/lfu-cache/-/lfu-cache-1.1.0.tgz","fileCount":20,"unpackedSize":102096,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZ0CK3NoxX0UDPrhalkXpPL/8/F8+6UMVNLvgbSHSeCAiBsn9VTDbX3Dy6GCbh7w61tAsNUV6Bzxk+6MxHyc2Zznw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGyMhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwZg/9G0fe9SIn2kF5PgHC+0vt5Qzb2eRO4l8dqi/2IxpxUjeq2x3/\r\nVAXw9Jn6JH8V56hhsYPgdafJ/b6aZEFUqYJx+umn2liAOo9OjQSNUFxp9kxd\r\nOgBVvsrNRMb0aRXVBK8ZFHrKqTUd4ZIwxwCem+ar59DtxoFSIBYHtLKxcqOS\r\nZROvq+BPI+6xD35KHJPgXw9w+p2rmG5tVFBYMOQB1rm/U8vfP3kcDVTwke95\r\nrTk86L0sFsBF4Yd9Rzbl+L4m2N76bjliDxnkiWkV04FijnEwiCNN0B3kr2wa\r\nlTY3cYKD/I1AE4rNIPl3QBcKmfoYKtzNEGtBvTtXh3jalO9FXoAVLNnknmmJ\r\nCIgGE/KxIuO9VI5OvWDJL07jXQCigEcQzQiWlIaQNz3MO9fI3/Zis0WmdffY\r\nPQQRumYIesr4b4RT9RO71fhpdHTC1qzUePVeRMBxqRVjuTRQth3fv2nPJ6pj\r\nbZyZ31Bk3MVyQvqVc83MdCe+nuSJBS0QfmQlfveRpEnljdJiq0wOUes7rjsA\r\n16gIfC3PoAOR5gS5FGPNbCvNGuRtDI7LkTw1EyE5ke5ELq4UnwIXH/kskmOG\r\n8hXfwFF7t50W3CgzeXzw/QGLiIOq1Oj1RFeMCCM/FihG5PdfK+6Ov0g7uLxI\r\nfV9m/tW+3TqrXSmzsfx35KF+tZhz3a0rPho=\r\n=QIWS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akashbabu","email":"001akashbabu@gmail.com"},"directories":{},"maintainers":[{"name":"akashbabu","email":"001akashbabu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lfu-cache_1.1.0_1662722849052_0.14447508354656247"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-22T06:58:31.766Z","1.0.0":"2019-12-22T06:58:31.959Z","modified":"2022-09-09T11:27:29.288Z","1.0.1":"2019-12-29T07:00:54.446Z","1.0.2":"2020-01-29T02:11:09.639Z","1.1.0":"2022-09-09T11:27:29.223Z"},"maintainers":[{"name":"akashbabu","email":"001akashbabu@gmail.com"}],"description":"LFU cache implementation with a complexity of `O(1)` for all transactions","homepage":"https://github.com/AkashBabu/lfu-cache#readme","keywords":["lfu","lru","cache","fast","O(1)","typescript"],"repository":{"type":"git","url":"git+https://github.com/AkashBabu/lfu-cache.git"},"author":{"name":"001akashbabu@gmail.com"},"bugs":{"url":"https://github.com/AkashBabu/lfu-cache/issues"},"license":"MIT","readme":"# lfu-cache [![Coverage Status](https://coveralls.io/repos/github/AkashBabu/lfu-cache/badge.svg?branch=master)](https://coveralls.io/github/AkashBabu/lfu-cache?branch=master) [![Build Status](https://travis-ci.com/AkashBabu/lfu-cache.svg?branch=master)](https://travis-ci.com/AkashBabu/lfu-cache) [![Maintainability](https://api.codeclimate.com/v1/badges/b31fd7f387b54be7a02c/maintainability)](https://codeclimate.com/github/AkashBabu/lfu-cache/maintainability)\n\nLFU cache implementation with a complexity of `O(1)` for all transactions, as described in the paper [\"An O(1) algorithm for implementing the LFU cache eviction scheme\" by K. Shah, A. Mitra and D. Matani](http://dhruvbird.com/lfu.pdf)\n\nWhat's the motivation behind creating this library(inspite of other currently existing LFU cache libraries out there) ?\n- Most importantly it's the Typescript support\n- Implementation of `O(1)` for all transactions (even though I din create the algorithm for it 😜)\n- Maintainable code\n\n\nIf you ever wanna peek into the source code, I would suggest you to read the algorithm in above mentioned paper first and then look into code, for better understanding or suggestions.\n\n## Installation\n\n> npm i @akashbabu/lfu-cache -S\n\n## Example\n\n```TS\nimport LFUCache from '@akashbabu/lfu-cache';\n\nconst lfu = new LFUCache<string>();\n\nlfu.set('foo', 'bar');\nconsole.log(lfu.size) // => 1\n\nconsole.log(lfu.get('foo')) // => bar\nconsole.log(lfu.peek('foo')) // => bar\n\nlfu.delete('foo')\nconsole.log(lfu.get('foo')) // => undefined\n\n\nlfu.set('item1', 'foo')\nlfu.set('item1', 'bar')\nconsole.log(lfu.get('item1')) // => bar\n\nlfu.clear();\nconsole.log(lfu.size) // => 0\n\nlfu.set('item1', 'foo')\nlfu.set('item2', 'bar')\nlfu.set('item3', 'baz')\n\nlfu.forEach(([key, val], i) => {\n  console.log(`${i + 1})`, key, val)\n})\n// => 1) item1 foo\n// => 2) item2 bar\n// => 3) item3 baz\n\nconsole.log(lfu.map<string>(([key, val], i) => `${i + 1}) ${key} -> ${val}`))\n// => [\"1) item1 foo\", \"2) item2 bar\", \"3) item3 baz\"]\n```\n\n\n## API Documentation\n\n#### new LFUCache\\<T>(options? = {})\n\nInstantiates LFU cache\n\nT -> Type of the value being stored\n\n| Param | Description |\n|:------|:------------|\n| options.max (optional) | Specifies the maximum number item to accumulate in the cache. Defaults to `100` |\n| options.evictCount (optional) | Specifies the number of items to be evicted once the cache is full. If `options.max` is specified and `options.evictCount` is not specified, then it defaults to `10%` of `options.max` else it defaults to `1` |\n| options.maxAge (optional) | If specified, then lazily evicts the keys after the specified `maxAge`. Please note that this is in `milliseconds (ms)` | \n\n\n#### .size\n\nReturns the total number of items in the cache.  \nThis is a `readonly` property.\n\n\n#### .set(key: string, value: T): void\n\nCaches the given key-value pair and evicts LFU keys if the cache is full.\n\n\n#### .get(key: string): T | undefined\n\nReturns the cached value if present or if NOT expired, else returns `undefined`\n\n\n#### .delete(key: string): boolean\n\nRemoves the given key from cache. Returns `true` if the given key was present and it has been removed successfully else returns `false`\n\n\n#### .peek(key: string): T | undefined\n\nReturns the cached value for the given key without increasing the access frequency of the given key. Returns `undefined` if the given keys if NOT present in the cache\n\n\n#### .forEach(cb: ([key: string, val: T], i: number) => void): void\n\nIterates through the entire cache\n\n\n#### .map<U>(cb: ([key: string, val: T], i: number) => U): U[]\n\nIterates through the entire cache and returns the resultant array\n\nU -> Denotes the return type when `cb` is called\n\n\n#### .clear(): void\n\nClears all the data in the cache\n\n\n## Contribution\n\nWe beleive there is nothing we've left out in `v1.0.0`, but there is always scope for development, hence if you find any bug or have any suggestion to make, then please proceed to github and raise an Issue or PR for the same.\n","readmeFilename":"README.md"}