{"name":"map-cache","description":"Create a simple cache object for storing key-value pairs.","version":"0.1.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":{"type":"MIT","url":"https://github.com/jonschlinkert/map-cache/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"keywords":[],"_id":"map-cache@0.1.0","_shasum":"c10ab293d4605c8b824fddd4869dea9a558c3c33","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c10ab293d4605c8b824fddd4869dea9a558c3c33","tarball":"http://registry-npm.ywwl.com/map-cache/download/map-cache-0.1.0.tgz","integrity":"sha512-zXRKxTsGg5AGB4bonohyiyoVMAz2btjeVOzdhmOhW+t2yL9d85wBgGo6OfTJyslYLOjad0aKXY1Xy0wWERVsYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChvFonYfnauVnYdza3IdoSrNY6KRQlJBiwx6+qYEEK6wIgMM90oaj3SRUYsRZoFfXl5p48KkecdWzQv58L+E91fsY="}],"size":2370,"noattachment":false,"key":"/map-cache/-/map-cache-0.1.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":1424861698270,"_cnpm_publish_time":1424861698270,"dist-tags":{"latest":"0.2.2"}}