{
  "_args": [
    [
      {
        "raw": "lru-cache@^4.0.0",
        "scope": null,
        "escapedName": "lru-cache",
        "name": "lru-cache",
        "rawSpec": "^4.0.0",
        "spec": ">=4.0.0 <5.0.0",
        "type": "range"
      },
      "/build/npm-check-updates/pkg/npm-check-updates/usr/lib/node_modules/npm-check-updates/node_modules/snyk-try-require"
    ]
  ],
  "_from": "lru-cache@>=4.0.0 <5.0.0",
  "_id": "lru-cache@4.0.2",
  "_inCache": true,
  "_location": "/npm-check-updates/lru-cache",
  "_nodeVersion": "6.5.0",
  "_npmOperationalInternal": {
    "host": "packages-12-west.internal.npmjs.com",
    "tmp": "tmp/lru-cache-4.0.2.tgz_1480273800672_0.31606275402009487"
  },
  "_npmUser": {
    "name": "isaacs",
    "email": "i@izs.me"
  },
  "_npmVersion": "3.10.9",
  "_phantomChildren": {},
  "_requested": {
    "raw": "lru-cache@^4.0.0",
    "scope": null,
    "escapedName": "lru-cache",
    "name": "lru-cache",
    "rawSpec": "^4.0.0",
    "spec": ">=4.0.0 <5.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/npm-check-updates/snyk-resolve-deps",
    "/npm-check-updates/snyk-try-require"
  ],
  "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz",
  "_shasum": "1d17679c069cda5d040991a09dbc2c0db377e55e",
  "_shrinkwrap": null,
  "_spec": "lru-cache@^4.0.0",
  "_where": "/build/npm-check-updates/pkg/npm-check-updates/usr/lib/node_modules/npm-check-updates/node_modules/snyk-try-require",
  "author": {
    "name": "Isaac Z. Schlueter",
    "email": "i@izs.me"
  },
  "bugs": {
    "url": "https://github.com/isaacs/node-lru-cache/issues"
  },
  "dependencies": {
    "pseudomap": "^1.0.1",
    "yallist": "^2.0.0"
  },
  "description": "A cache object that deletes the least-recently-used items.",
  "devDependencies": {
    "standard": "^5.4.1",
    "tap": "^8.0.1"
  },
  "directories": {},
  "dist": {
    "shasum": "1d17679c069cda5d040991a09dbc2c0db377e55e",
    "tarball": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz"
  },
  "files": [
    "lib/lru-cache.js"
  ],
  "gitHead": "f25bdae0b4bb0166a75fa01d664a3e3cece1ce98",
  "homepage": "https://github.com/isaacs/node-lru-cache#readme",
  "keywords": [
    "mru",
    "lru",
    "cache"
  ],
  "license": "ISC",
  "main": "lib/lru-cache.js",
  "maintainers": [
    {
      "name": "isaacs",
      "email": "isaacs@npmjs.com"
    },
    {
      "name": "othiym23",
      "email": "ogd@aoaioxxysz.net"
    }
  ],
  "name": "lru-cache",
  "optionalDependencies": {},
  "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)\n\n## Installation:\n\n```javascript\nnpm install lru-cache --save\n```\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n  , options = { max: 500\n              , length: function (n, key) { return n * 2 + key.length }\n              , dispose: function (key, n) { n.close() }\n              , maxAge: 1000 * 60 * 60 }\n  , cache = LRU(options)\n  , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\n// non-string keys ARE fully supported\nvar someObject = {}\ncache.set(someObject, 'a value')\ncache.set('[object Object]', 'a different value')\nassert.equal(cache.get(someObject), 'a value')\n\ncache.reset()    // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n  function to all values in the cache.  Not setting this is kind of\n  silly, since that's the whole purpose of this lib, but it defaults\n  to `Infinity`.\n* `maxAge` Maximum age in ms.  Items are not pro-actively pruned out\n  as they age, but if you try to get an item that is too old, it'll\n  drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n  items.  If you're storing strings or buffers, then you probably want\n  to do something like `function(n, key){return n.length}`.  The default is\n  `function(){return 1}`, which is fine if you want to store `max`\n  like-sized things.  The item is passed as the first argument, and\n  the key is passed as the second argumnet.\n* `dispose` Function that is called on items when they are dropped\n  from the cache.  This can be handy if you want to close file\n  descriptors or do other cleanup tasks when items are no longer\n  accessible.  Called with `key, value`.  It's called *before*\n  actually removing the item from the internal cache, so if you want\n  to immediately put it back in, you'll have to do that in a\n  `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n  stale items out of the cache when you `get(key)`.  (That is, it's\n  not pre-emptively doing a `setTimeout` or anything.)  If you set\n  `stale:true`, it'll return the stale value before deleting it.  If\n  you don't set this, then it'll return `undefined` when you try to\n  get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n    Both of these will update the \"recently used\"-ness of the key.\n    They do what you think. `maxAge` is optional and overrides the\n    cache `maxAge` option if provided.\n\n    If the key is not found, `get()` will return `undefined`.\n\n    The key and val can be any value.\n\n* `peek(key)`\n\n    Returns the key value (or `undefined` if not found) without\n    updating the \"recently used\"-ness of the key.\n\n    (If you find yourself using this a lot, you *might* be using the\n    wrong sort of data structure, but there are some use cases where\n    it's handy.)\n\n* `del(key)`\n\n    Deletes a key out of the cache.\n\n* `reset()`\n\n    Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n    Check if a key is in the cache, without updating the recent-ness\n    or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n    Just like `Array.prototype.forEach`.  Iterates over all the keys\n    in the cache, in order of recent-ness.  (Ie, more recently used\n    items are iterated over first.)\n\n* `rforEach(function(value,key,cache), [thisp])`\n\n    The same as `cache.forEach(...)` but items are iterated over in\n    reverse order.  (ie, less recently used items are iterated over\n    first.)\n\n* `keys()`\n\n    Return an array of the keys in the cache.\n\n* `values()`\n\n    Return an array of the values in the cache.\n\n* `length`\n\n    Return total length of objects in cache taking into account\n    `length` options function.\n\n* `itemCount`\n\n    Return total quantity of objects currently in cache. Note, that\n    `stale` (see options) items are returned as part of this item\n    count.\n\n* `dump()`\n\n    Return an array of the cache entries ready for serialization and usage\n    with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n    Loads another cache entries array, obtained with `sourceCache.dump()`,\n    into the cache. The destination cache is reset before loading new entries\n\n* `prune()`\n\n    Manually iterates over the entire cache proactively pruning old entries\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/isaacs/node-lru-cache.git"
  },
  "scripts": {
    "posttest": "standard test/*.js lib/*.js",
    "test": "tap test --100"
  },
  "version": "4.0.2"
}
