{"name":"map-cache","description":"Basic cache object for storing key-value pairs.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/map-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/map-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/map-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["cache","get","has","object","set","storage","store"],"gitHead":"fd92615eafc29f7898067ed7411dd082af325164","_id":"map-cache@0.2.0","_shasum":"3c900dc509c9eda4df063fd6f0f9002d91ab2455","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3c900dc509c9eda4df063fd6f0f9002d91ab2455","tarball":"http://registry-npm.ywwl.com/map-cache/download/map-cache-0.2.0.tgz","integrity":"sha512-tX7FLgRqiT64jl/RTToGs5vSVDuoUBnN8RzZysf6xh8OiPDC7xtHyUlx1KqQkT9T57fRUaD+amvAQ3iSHQso7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClRr+PXjHhFMH6dw2SO6FpyMlyE9KZPYSVB4TzzOLMRQIhAP+1nrynYDSi435q0mLn1GqQfJt5CwD5FQ4YGMpXyEQZ"}],"size":2575,"noattachment":false,"key":"/map-cache/-/map-cache-0.2.0.tgz"},"directories":{},"readme":"# map-cache [![NPM version](https://img.shields.io/npm/v/map-cache.svg?style=flat)](https://www.npmjs.com/package/map-cache) [![NPM downloads](https://img.shields.io/npm/dm/map-cache.svg?style=flat)](https://npmjs.org/package/map-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-cache)\n\nBasic cache object for storing key-value pairs.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install map-cache --save\n```\n\nBased on MapCache in Lo-dash v3.0. [MIT License](https://github.com/lodash/lodash/blob/master/LICENSE.txt)\n\n## Usage\n\n```js\nvar MapCache = require('map-cache');\nvar mapCache = new MapCache();\n```\n\n## API\n\n### [MapCache](index.js#L28)\n\nCreates a cache object to store key/value pairs.\n\n**Example**\n\n```js\nvar cache = new MapCache();\n```\n\n### [.set](index.js#L45)\n\nAdds `value` to `key` on the cache.\n\n**Params**\n\n* `key` **{String}**: The key of the value to cache.\n* `value` **{any}**: The value to cache.\n* `returns` **{Object}**: Returns the `Cache` object for chaining.\n\n**Example**\n\n```js\ncache.set('foo', 'bar');\n```\n\n### [.get](index.js#L65)\n\nGets the cached value for `key`.\n\n**Params**\n\n* `key` **{String}**: The key of the value to get.\n* `returns` **{any}**: Returns the cached value.\n\n**Example**\n\n```js\ncache.get('foo');\n//=> 'bar'\n```\n\n### [.has](index.js#L82)\n\nChecks if a cached value for `key` exists.\n\n**Params**\n\n* `key` **{String}**: The key of the entry to check.\n* `returns` **{Boolean}**: Returns `true` if an entry for `key` exists, else `false`.\n\n**Example**\n\n```js\ncache.has('foo');\n//=> true\n```\n\n### [.del](index.js#L98)\n\nRemoves `key` and its value from the cache.\n\n**Params**\n\n* `key` **{String}**: The key of the value to remove.\n* `returns` **{Boolean}**: Returns `true` if the entry was removed successfully, else `false`.\n\n**Example**\n\n```js\ncache.del('foo');\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [cache-base](https://www.npmjs.com/package/cache-base): Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. | [homepage](https://github.com/jonschlinkert/cache-base)\n* [config-cache](https://www.npmjs.com/package/config-cache): General purpose JavaScript object storage methods. | [homepage](https://github.com/jonschlinkert/config-cache)\n* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-cache/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/map-cache/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 10, 2016._","publish_time":1435079253511,"_cnpm_publish_time":1435079253511,"dist-tags":{"latest":"0.2.2"}}