{"_id":"lrucache","_rev":"14-6c0d270d6dd9379432dfdcf6bf76ff0f","name":"lrucache","description":"LRU Cache for node.js/browser.","dist-tags":{"latest":"1.0.3"},"versions":{"0.1.0":{"name":"lrucache","description":"LRU Cache in node/browser.","author":{"name":"zensh"},"version":"0.1.0","main":"lrucache.js","repository":{"type":"git","url":"git@github.com:zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2"},"scripts":{"test":"grunt test"},"gitHead":"d6d8c2b185aa16eb044adcc4da61fe5155263065","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@0.1.0","_shasum":"2ab3001df52465c12635089f3742a836c7e9c41b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"2ab3001df52465c12635089f3742a836c7e9c41b","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-0.1.0.tgz","integrity":"sha512-NotcARA05jkBGxJhH5pJHn5dkHClq+e9r47sNCklLdC8LjHteFEM8eHKpJU1u9KomlSB5EM+/Fu9Glv/vT1wbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsU7fmFA6R96jQxeUdf/xrNS3z+kNC19iEBNdDxqeKGAiAQAPMDdUYjiBWDq3Ejviu1InzhwirR3IJDdZ23n4ka5Q=="}]}},"0.1.1":{"name":"lrucache","description":"LRU Cache in node/browser.","author":{"name":"zensh"},"version":"0.1.1","main":"lrucache.js","repository":{"type":"git","url":"git@github.com:zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2"},"scripts":{"test":"grunt test"},"gitHead":"202b152abd9cb191a12e6a4b583ebb6891ad9ef6","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@0.1.1","_shasum":"75bce41e3e841e70777d45a404d37129446828d4","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"75bce41e3e841e70777d45a404d37129446828d4","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-0.1.1.tgz","integrity":"sha512-N6nGCM63jYldk2RxvDPUXPimDhmsaPFzTNCm7wz8U032s2H73F13n7VUKiP/S6neQDmauuhL/pUS04MSwNlhAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcNaj3xBVpvZAV6gvibzgPDyRGgjIjAQ2cM+vFjS2fgQIgdrGrRwPD4TSWxouP7WyWlgepOCwO42LHVirscIKB9W4="}]}},"0.2.0":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"0.2.0","main":"lrucache.js","repository":{"type":"git","url":"git@github.com:zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"gulp":">=3.8.0","gulp-jshint":">=1.8.4","gulp-mocha":">=1.0.0","gulp-sequence":">=0.3.1","mocha":">=1.21.0","should":">=4.0.4"},"scripts":{"test":"gulp test"},"ignore":["**/.*","benchmark","test","gulpfile.js","bower.json"],"gitHead":"25228834df7fa70680cd9dfbeb885970ff65a7f2","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@0.2.0","_shasum":"1edc7dc845454a5c7b6bd0cf302f13b85b3f06da","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"1edc7dc845454a5c7b6bd0cf302f13b85b3f06da","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-0.2.0.tgz","integrity":"sha512-ZBwD5LgXbq6uwKqBLscCAaMgK82y9ctDDBq1xPiIUyEDd8lXwx0FJGOvIVlaza7fITIdSBEpOYQZfIMdNCg23w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWwN+43pXFIbh1nRCANWj3YTl5HS6lkGAN2FG2ivAz5QIhAKqMqKc1QMDQ8A80LwpkzvgNRVUFhmS9gIGd9EW0kdvm"}]}},"0.3.0":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"0.3.0","main":"lrucache.js","repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"gulp":"^3.9.0","gulp-mocha":"^2.1.3","gulp-sequence":"^0.4.1","mocha":"^2.2.5","should":"^7.0.4","standard":"^5.1.0"},"scripts":{"test":"gulp test"},"ignore":["**/.*","benchmark","test","gulpfile.js","bower.json"],"gitHead":"11b55e80028ee0a37bc22edadddf884b4a684fb8","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@0.3.0","_shasum":"a179645d53b705f983a2ba65afd0b0ef43f25fa8","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"a179645d53b705f983a2ba65afd0b0ef43f25fa8","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-0.3.0.tgz","integrity":"sha512-Jh2nw26rtQoogWr8789SYkEgpgKSaPPrDdlI20qOO/V7PAdrHy9WvIgsgr6Hz2WuWHMeZeeBylTyw/sgnZA3RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH2P/6/YaXXLbuC5CJTXSHv1/UiPYk280gFZdsiY8xZcCIQDtWqcC4XnOgz6Qz02SJ9Lqi5w0PHRMjPnjxA+KnQD4Vg=="}]}},"1.0.0":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"1.0.0","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"mocha":"^2.2.5","should":"^7.0.4","standard":"^5.1.0"},"scripts":{"test":"standard && mocha"},"files":["README.md","index.js"],"gitHead":"5d50c95a634b7abd1a3994d81d3b456a03204e63","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@1.0.0","_shasum":"4fc92f0cbc253959bc4aa71c30573d99385d1714","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"4fc92f0cbc253959bc4aa71c30573d99385d1714","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-1.0.0.tgz","integrity":"sha512-goTjV53+41VneHdAdGSlvITEhb85TofBeek8Zsng2hhUhL5qSbG7olLOkQ2lXylbPRbWQ3uOZawN55XGv5G1vA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1RYOzBZm8NY4OM1wqQS78M4puXX7rCpgpxsfk1lQXuAiEAwIAVdGtkoEZANZETgPEAqDSQ9QXbjzaQUrzXFnrmHCQ="}]}},"1.0.1":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"1.0.1","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"should":"^8.3.0","standard":"^6.0.8","tman":"^0.5.2"},"scripts":{"test":"standard && tman"},"files":["README.md","index.js"],"gitHead":"c3f7a8cc67cddf564dfb7d60b472941a884071ed","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@1.0.1","_shasum":"7de2c10159b50c23359181a7299f9b97c5ed4918","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"7de2c10159b50c23359181a7299f9b97c5ed4918","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-1.0.1.tgz","integrity":"sha512-rn0sI18Sw92FKvAmlyaxJSojvTbOs5tV3f38yItklTF+bxSMh7AltPU31Ge4yO884bm51zSJE4HvT43Axkouww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD44M8KE5Qppk47/O00nLnc6kx3u5tdPiPonyO9QclagwIgKdCJ2k1jZMdxmtm9pnLPT322hbh4JV5KiYOb48N+iZM="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lrucache-1.0.1.tgz_1459737607620_0.6020782766863704"}},"1.0.2":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"1.0.2","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"standard":"^7.1.1","tman":"^0.9.8"},"scripts":{"test":"standard && tman"},"files":["README.md","index.js"],"gitHead":"1890be2f6747ac216a487666b3b69b59c804f7a7","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@1.0.2","_shasum":"066e7072a2b3f8647993abc017d735a559b0ee5a","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.4","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"066e7072a2b3f8647993abc017d735a559b0ee5a","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-1.0.2.tgz","integrity":"sha512-VzbKLgcB+7NDbkqbImNGZHAQuGB5tr6aivRO6X+mRoR9wb2M7pvpxNCLGxEpLxvMiJVyvzonVWbuU9Mcezq64Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCTJbKtSjnxxAD+F8wJyyWcfKSBMTF2IUTloi7RuWpzQIhAJbI8CsMEQEHr/4DcGImaPKWBfeZZY/DopcXYOY6XeXl"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/lrucache-1.0.2.tgz_1464411440651_0.6690578151028603"}},"1.0.3":{"name":"lrucache","description":"LRU Cache for node.js/browser.","author":"","version":"1.0.3","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"dependencies":{},"devDependencies":{"standard":"^10.0.2","tman":"^1.6.9"},"scripts":{"test":"standard && tman"},"files":["README.md","index.js"],"gitHead":"e3f96ea833a1559ec51c6e14774754577d61b67b","bugs":{"url":"https://github.com/zensh/lrucache/issues"},"_id":"lrucache@1.0.3","_shasum":"3b1ded0d1ba82e188b9bdaba9eee6486f864a434","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"zensh","email":"admin@zensh.com"},"maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"dist":{"shasum":"3b1ded0d1ba82e188b9bdaba9eee6486f864a434","tarball":"https://registry.npmjs.org/lrucache/-/lrucache-1.0.3.tgz","integrity":"sha512-OwQTGyq+57hmefrEv3Uhhyw4Z3l+aT/Q4nkdslVqy2n/7qIa4ML0wKnYcUUo54W1RRJYLdk2xKFsTaDGEVJLDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqBbXsQkJBLM0pJNreB+fnDLurCFzeYIEUEgIGRQi9SgIhALpkLpBAkXggC2gGRjk4KARF+siGIjiY0km7+9aKnVRH"}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lrucache-1.0.3.tgz_1499260360765_0.20529883517883718"}}},"readme":"# LRUCache\n\nLRU Cache for node.js/browser.\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads][downloads-image]][downloads-url]\n\n使用链表实现的 LRU 缓存。`get`、`set` 和 `update` 方法会更新 LRU 优先级。\n\n## Install\n\n**Node.js:**\n\n```sh\nnpm install lrucache\n```\n\n**bower:**\n\n```sh\nbower install lrucache\n```\n\n**Browser:**\n\n```html\n<script src=\"/pathTo/lrucache.js\"></script>\n```\n\n## API\n\n```js\nconst LRUCache = require('lrucache')\n```\n\n### Class LRUCache([capacity])\n\n+ `capacity`: : *Optional*, Type: `Number`, Default: `Number.MAX_SAFE_INTEGER`.\n\n```js\nconst cache = LRUCache(100)\n```\n\n### LRUCache.prototype.get(key)\n\nReturn `value`.\n\n```js\nlet a = cache.get('a')\n```\n\n### LRUCache.prototype.set(key, value)\n\nReturn `this`.\n\n```js\ncache.set('a', [1, 2, 3])\n```\n\n### LRUCache.prototype.update(key, fn)\n\nReturn `this`, It only run when key exists.\n\n```js\ncache.update('a', function (a) {\n  a.push(4)\n  return a\n})\n```\n\n### LRUCache.prototype.remove(key)\n\nReturn `this`.\n\n```js\ncache.remove('a')\n```\n\n### LRUCache.prototype.removeAll(key)\n\nReturn `this`.\n\n```js\ncache.removeAll()\n```\n\n### LRUCache.prototype.keys()\n\nReturn a array of `keys`.\n\n```js\ncache.keys()\n```\n\n### LRUCache.prototype.has(key)\n\nReturn `true` or `false`.\n\n```js\ncache.has('a')\n```\n\n### LRUCache.prototype.staleKey()\n\nReturn the stalest `key` or `null`.\n\n```js\nlet staleKey = cache.staleKey()\n```\n\n### LRUCache.prototype.popStale()\n\nReturn the stalest `data` or `null`.\n\n```js\nlet staleDate = cache.popStale()\n```\n\n### LRUCache.prototype.info()\n\nReturn `info`.\n\n```js\ncache.info()\n```\n\n[npm-url]: https://npmjs.org/package/lrucache\n[npm-image]: http://img.shields.io/npm/v/lrucache.svg\n\n[travis-url]: https://travis-ci.org/zensh/lrucache\n[travis-image]: http://img.shields.io/travis/zensh/lrucache.svg\n\n[downloads-url]: https://npmjs.org/package/lrucache\n[downloads-image]: http://img.shields.io/npm/dm/lrucache.svg?style=flat-square\n","maintainers":[{"name":"zensh","email":"admin@zensh.com"}],"time":{"modified":"2022-06-19T14:30:37.846Z","created":"2014-06-29T04:22:43.054Z","0.1.0":"2014-06-29T04:22:43.054Z","0.1.1":"2014-06-29T08:46:50.981Z","0.2.0":"2014-12-04T06:32:04.669Z","0.3.0":"2015-08-23T15:18:36.556Z","1.0.0":"2016-01-19T12:57:33.953Z","1.0.1":"2016-04-04T02:40:08.163Z","1.0.2":"2016-05-28T04:57:23.811Z","1.0.3":"2017-07-05T13:12:40.951Z"},"homepage":"https://github.com/zensh/lrucache","keywords":["lru","cache","lru-cache","lrucache"],"repository":{"type":"git","url":"git+ssh://git@github.com/zensh/lrucache.git"},"bugs":{"url":"https://github.com/zensh/lrucache/issues"},"readmeFilename":"README.md","users":{"fanazhe":true}}