{"_id":"pkg-cache","_rev":"221055","name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","dist-tags":{"latest":"0.1.4"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:39:59.000Z","created":"2016-04-21T18:10:24.793Z","0.1.4":"2016-06-03T17:26:57.518Z","0.1.3":"2016-04-21T18:46:10.673Z","0.1.2":"2016-04-21T18:38:48.468Z","0.1.1":"2016-04-21T18:15:18.314Z","0.1.0":"2016-04-21T18:10:24.793Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"versions":{"0.1.4":{"name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","version":"0.1.4","homepage":"https://github.com/jonschlinkert/pkg-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"data-store":"^0.16.0","date-store":"^0.1.2","debug":"^2.2.0","get-pkgs":"^0.6.0","lazy-cache":"^2.0.1"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.9","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","mocha":"^2.5.3"},"keywords":["cache","data","date","get","json","package","package-json","packages","pkg","set","since","store","time","timespan"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["data-store","date-store","get-pkg","get-pkgs"]},"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"cab36832f1fcbd1afef1ea609ee6585215502a83","_id":"pkg-cache@0.1.4","_shasum":"8e2b8683bf823083f39e93e53dba9d5e42a089a8","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8e2b8683bf823083f39e93e53dba9d5e42a089a8","size":3429,"noattachment":false,"key":"/pkg-cache/-/pkg-cache-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-cache/download/pkg-cache-0.1.4.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkg-cache-0.1.4.tgz_1464974815212_0.9919382173102349"},"directories":{},"publish_time":1464974817518,"_cnpm_publish_time":1464974817518,"_hasShrinkwrap":false},"0.1.3":{"name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/pkg-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"data-store":"^0.15.5","date-store":"^0.1.2","debug":"^2.2.0","get-pkgs":"^0.5.0","lazy-cache":"^1.0.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.8","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","mocha":"^2.4.5"},"keywords":["cache","data","date","get","json","package","package-json","packages","pkg","set","since","store","time","timespan"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["data-store","date-store","get-pkg","get-pkgs"]},"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"b16dd2a752542cb5f9288494bd2916f08bb28a4d","_id":"pkg-cache@0.1.3","_shasum":"02916eec9da9b1d6bd1a32206820b2a4fdecaa59","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"02916eec9da9b1d6bd1a32206820b2a4fdecaa59","size":4204,"noattachment":false,"key":"/pkg-cache/-/pkg-cache-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-cache/download/pkg-cache-0.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkg-cache-0.1.3.tgz_1461264368363_0.6796336357947439"},"directories":{},"publish_time":1461264370673,"_cnpm_publish_time":1461264370673,"_hasShrinkwrap":false},"0.1.2":{"name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/pkg-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"data-store":"^0.15.5","date-store":"^0.1.2","debug":"^2.2.0","get-pkgs":"^0.5.0","lazy-cache":"^1.0.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.8","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","mocha":"^2.4.5"},"keywords":["cache","data","date","get","json","package","package-json","packages","pkg","set","since","store","time","timespan"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["data-store","date-store","get-pkg","get-pkgs"]},"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"40dca231e37fda314e07f6841e9a6c771b3e3ce8","_id":"pkg-cache@0.1.2","_shasum":"447adafa5f1c9481843b900ff4989947f89ebcd7","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"447adafa5f1c9481843b900ff4989947f89ebcd7","size":4237,"noattachment":false,"key":"/pkg-cache/-/pkg-cache-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-cache/download/pkg-cache-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/pkg-cache-0.1.2.tgz_1461263927086_0.8149695934262127"},"directories":{},"publish_time":1461263928468,"_cnpm_publish_time":1461263928468,"_hasShrinkwrap":false},"0.1.1":{"name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/pkg-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"data-store":"^0.15.5","date-store":"^0.1.2","debug":"^2.2.0","get-pkgs":"^0.5.0","lazy-cache":"^1.0.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.8","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","mocha":"^2.4.5"},"keywords":["cache","data","date","get","json","package","package-json","packages","pkg","set","since","store","time","timespan"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["data-store","date-store","get-pkg","get-pkgs"]},"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"a056a02eb5339ce6f8c10b8c00f038d862cbe670","_id":"pkg-cache@0.1.1","_shasum":"c29699f18f04416c143a1cc304a26e670077b3e6","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c29699f18f04416c143a1cc304a26e670077b3e6","size":3965,"noattachment":false,"key":"/pkg-cache/-/pkg-cache-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-cache/download/pkg-cache-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkg-cache-0.1.1.tgz_1461262515815_0.9095551420468837"},"directories":{},"publish_time":1461262518314,"_cnpm_publish_time":1461262518314,"_hasShrinkwrap":false},"0.1.0":{"name":"pkg-cache","description":"Gets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/pkg-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/pkg-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"data-store":"^0.15.5","date-store":"^0.1.2","debug":"^2.2.0","get-pkgs":"^0.5.0","lazy-cache":"^1.0.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.8","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","mocha":"^2.4.5"},"keywords":["cache","data","date","get","json","package","package-json","packages","pkg","set","since","store","time","timespan"],"verb":{"plugins":["gulp-format-md"],"reflinks":["verb"],"related":{"list":["data-store","date-store","get-pkg","get-pkgs"]},"toc":false,"layout":"default","lint":{"reflinks":true},"tasks":["readme"]},"gitHead":"1b754c507cdc2d89433f4c652d39cec93cccff38","_id":"pkg-cache@0.1.0","_shasum":"8fdf68840f04c0c6bcb8ad1b347049473549406f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8fdf68840f04c0c6bcb8ad1b347049473549406f","size":3091,"noattachment":false,"key":"/pkg-cache/-/pkg-cache-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-cache/download/pkg-cache-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/pkg-cache-0.1.0.tgz_1461262223321_0.8510330670978874"},"directories":{},"publish_time":1461262224793,"_cnpm_publish_time":1461262224793,"_hasShrinkwrap":false}},"readme":"# pkg-cache [![NPM version](https://img.shields.io/npm/v/pkg-cache.svg?style=flat)](https://www.npmjs.com/package/pkg-cache) [![NPM downloads](https://img.shields.io/npm/dm/pkg-cache.svg?style=flat)](https://npmjs.org/package/pkg-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/pkg-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/pkg-cache)\n\nGets the package.json for one or more names from the npm registry and caches the results for a specified period of time. Default cache period is one week.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install pkg-cache --save\n```\n\n## Usage\n\n```js\nvar pkgCache = require('pkg-cache');\n```\n\n## API\n\n### [pkgCache](index.js#L44)\n\nGet the package.json for one or more `names`. Results are cached for 1 week by default.\n\n**Params**\n\n* `names` **{String|Array}**: package names\n* `options` **{Object}**\n* `callback` **{Function}**\n* `returns` **{Array}**: Returns an array of package.json objects.\n\n**Example**\n\n```js\n// results are cached for 1 week by default\npkgCache(['micromatch', 'base'], function(err, pkgs) {\n  if (err) throw err;\n  console.log(pkgs);\n});\n\n// customize the cache \"max age\"\npkgCache(['micromatch', 'base'], {timespan: '1 week ago'}, function(err, pkgs) {\n  if (err) throw err;\n  console.log(pkgs);\n});\n\n// or\npkgCache(['micromatch', 'base'], {maxAge: '0 sec'}, function(err, pkgs) {\n  if (err) throw err;\n  console.log(pkgs);\n});\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [data-store](https://www.npmjs.com/package/data-store): Easily get, set and persist config data. | [homepage](https://github.com/jonschlinkert/data-store)\n* [date-store](https://www.npmjs.com/package/date-store): Easily persist or get stored dates/times. Useful for conditionally making updates in an application based… [more](https://www.npmjs.com/package/date-store) | [homepage](https://github.com/jonschlinkert/date-store)\n* [get-pkg](https://www.npmjs.com/package/get-pkg): Get the package.json for a project from npm. | [homepage](https://github.com/jonschlinkert/get-pkg)\n* [get-pkgs](https://www.npmjs.com/package/get-pkgs): Get the package.json for an array of repos from the npm registry, optionally filtering properties… [more](https://www.npmjs.com/package/get-pkgs) | [homepage](https://github.com/jonschlinkert/get-pkgs)\n\n## Contributing\n\nThis document was generated by [verb](https://github.com/verbose/verb), please don't edit directly. Any changes to the readme must be made in [.verb.md](.verb.md). See [Building Docs](#building-docs).\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pkg-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 -g verb verb-readme-generator && 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/pkg-cache/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on June 03, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/pkg-cache","bugs":{"url":"https://github.com/jonschlinkert/pkg-cache/issues"},"license":"MIT"}