{"_id":"plasma-cache","_rev":"8-1180cc3de0ca11b6ff78e4032f2eed14","name":"plasma-cache","description":"Object cache for [Plasma].","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"plasma-cache","description":"Object cache for plasma.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/plasma-cache"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","kind-of":"^1.1.0","object.omit":"^1.1.0","plasma":"^0.8.2"},"devDependencies":{"mocha":"*","should":"*"},"keywords":[],"_id":"plasma-cache@0.1.0","_shasum":"461b7078d3b35f06cc4a31bfd9f6ab96f99ba1b9","_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":"461b7078d3b35f06cc4a31bfd9f6ab96f99ba1b9","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.1.0.tgz","integrity":"sha512-9G+ET5MIHY9ApIz2tSq+dL80hRz79hV4w6ltnOtUewTayUjHtK6rqSzLld+Qy8p86Q1lWD5j11KtGXHshf6GZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBrRqVQ5o1Y28/L6DTXlh0j434kXaI+U2h9DvXMWWGV+AiEAsTlFX1PDr1WJID1/PLTQ5K7xWS4PaB3C2aMTTPtb6+Y="}]}},"0.1.1":{"name":"plasma-cache","description":"Object cache for Plasma.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/plasma-cache"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","object.omit":"^1.1.0","plasma":"^0.8.2"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"gitHead":"cf2f6f3f7adf97dd5e87df5875cc246ee6c485f8","_id":"plasma-cache@0.1.1","_shasum":"ac85b5a351df277786602ad45ff5fc13d292c5a8","_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":"ac85b5a351df277786602ad45ff5fc13d292c5a8","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.1.1.tgz","integrity":"sha512-P0KaY+ebmk45/3aeYDGLFbhdJASbgFMNznTQmd7f0hvjUD1+H+EHJ5o/MZQoQZ5LQCoGk/RR8iDgwVAUImcHUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5mc7qQS4SOXF/0ixWKABsj9gGNdMKrzjGn/3TckvVqAiASyT6PQW/nriF7qGB8Lso0PIhrPwva1lW+Ar0NkuPuXw=="}]}},"0.1.2":{"name":"plasma-cache","description":"Object cache for [Plasma].","version":"0.1.2","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/plasma-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"component-emitter":"^1.2.0","expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","object.omit":"^1.1.0","plasma":"^0.8.2"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"gitHead":"780a9d4f64ec48d5357920604d6d15d4782ac8e3","_id":"plasma-cache@0.1.2","_shasum":"528f04a863a0f90a2c82979d0ce40cbecdbbb8a3","_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":"528f04a863a0f90a2c82979d0ce40cbecdbbb8a3","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.1.2.tgz","integrity":"sha512-i9eJR/N/yqar+Zs6u48KGvyKyX2BFYJlSZOMt4M6Um95qmrl0uZ6yxyYJ7mlqKpQGKgXFvSffy8erW87L3gzPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAo2+H59LPc9xK556EmNBHNqOfQ7k+V8ndSrOi/ATO8/AiEAjUT2kXzHgF0T07t9iC7OlFUj3rmMcKVLDpu2srXe9Ok="}]}},"0.2.0":{"name":"plasma-cache","description":"Object cache for [Plasma].","version":"0.2.0","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/plasma-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"component-emitter":"^1.2.0","expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","object.omit":"^1.1.0","plasma":"^0.9.0"},"devDependencies":{"js-yaml":"^3.3.1","mocha":"*","should":"*"},"keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"gitHead":"7cd288e270c91cc187ccccb5c3bc87aba1bf5a96","_id":"plasma-cache@0.2.0","_shasum":"9d1c01d7017986158bd77f6d625ede3ecab8a2cb","_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":"9d1c01d7017986158bd77f6d625ede3ecab8a2cb","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.2.0.tgz","integrity":"sha512-tofTGTiwb9wgE7bZtOFM4RZ7ChSr36p41rALWmQCESAIpW6PHtHv3557kcP/t2mWh+NPct5PxK1UcIrzmfwabA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAuSQTuyos4MHDd9xRpiOg9oB6x/zArrkyOqzlUN32E4AiEAvaUj/IQyVkdskeucwRzRKZWpiySd54FNrAP3VUSQxko="}]}},"0.2.1":{"name":"plasma-cache","description":"Object cache for [Plasma].","version":"0.2.1","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/plasma-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"component-emitter":"^1.2.0","expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","lazy-cache":"^0.1.0","object.omit":"^1.1.0","plasma":"^0.9.1"},"devDependencies":{"js-yaml":"^3.3.1","mocha":"*","should":"*"},"keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"gitHead":"147e6e8e6111a1a8ba3358e0e14dc3e888ffd55b","_id":"plasma-cache@0.2.1","_shasum":"5d3d8267bde873a5dae86361dab9706044d3b564","_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":"5d3d8267bde873a5dae86361dab9706044d3b564","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.2.1.tgz","integrity":"sha512-TzWVGiohTtsOP4zz9M/+QvdM0VxOQkCyU1rhavSO1AoUA2j5HjsvaRMleS3+24p5deKJ7v2D9DBS2alubXdxUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwKoQzAiJrZwTpZXo3x1GBWjyyB3TgsxNOAwfr2lzzGAiEAlHaCsCj2m7w96BDNr/3clovXzx68gDbHkCYD+zye7AI="}]}},"0.2.2":{"name":"plasma-cache","description":"Object cache for [Plasma].","version":"0.2.2","homepage":"https://github.com/jonschlinkert/plasma-cache","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/plasma-cache.git"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"component-emitter":"^1.2.0","expander":"^0.3.3","extend-shallow":"^1.1.4","filter-functions":"^0.1.0","lazy-cache":"^0.1.0","object.omit":"^1.1.0","plasma":"^0.9.1"},"devDependencies":{"js-yaml":"^3.3.1","mocha":"*","should":"*"},"keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"gitHead":"00e849091e95b5e22957422112a5c06d2f041cd0","_id":"plasma-cache@0.2.2","_shasum":"0ed7741c7ae57eaaa0ec573e93e94c6116a259e7","_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":"0ed7741c7ae57eaaa0ec573e93e94c6116a259e7","tarball":"https://registry.npmjs.org/plasma-cache/-/plasma-cache-0.2.2.tgz","integrity":"sha512-mneaNFWfRfbLICOG/vm53yp+PfTZ1NyncbVgBfYNkuAZ2CyZ1c0+IcC8hVq738fqoSL9xx05T5Wm4kWaIY34ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw+4EomByQ40//gvYJM0lAF0B/VlpYs7s6r8nNzl/jyQIgXELhRdsrYrUUIGhudwRAKGP2AbVnE296eh8GAwD3Jp4="}]}}},"readme":"# plasma-cache [![NPM version](https://badge.fury.io/js/plasma-cache.svg)](http://badge.fury.io/js/plasma-cache)\n\n> Object cache for [Plasma](https://github.com/jonschlinkert/plasma).\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i plasma-cache --save\n```\n\nInstall with [bower](http://bower.io/)\n\n```sh\n$ bower install plasma-cache --save\n```\n\n## Usage\n\n```js\nvar PlasmaCache = require('plasma-cache');\nvar cache = new PlasmaCache();\n```\n\n## API\n\n### [PlasmaCache](index.js#L23)\n\nInitialize a new `PlasmaCache`.\n\n### [.plasma](index.js#L58)\n\nExtend the `data` object with the value returned by [plasma](https://github.com/jonschlinkert/plasma).\n\nSee the [plasma](https://github.com/jonschlinkert/plasma) documentation for all available options.\n\n**Params**\n\n* `data` **{Object|String|Array}**: File path(s), glob pattern, or object of data.\n* `options` **{Object}**: Options to pass to plasma.\n\n**Example**\n\n```js\ncache\n  .plasma({foo: 'bar'}, {baz: 'quux'});\n  .plasma({fez: 'bang'});\n```\n\n### [.dataLoader](index.js#L82)\n\nRegister a `dataLoader` that will read and load data from files with the given `ext`.\n\n**Params**\n\n* `ext` **{String}**: The extension of files to read.\n* `fn` **{String}**: The loader function\n\n**Example**\n\n```js\nvar fs = require('fs');\nvar yaml = require('js-yaml');\n\nplasma.dataLoader('yml', function (fp) {\n  var str = fs.readFileSync(fp, 'utf8');\n  return yaml.safeLoad(str);\n});\n```\n\n### [.process](index.js#L96)\n\nUse [expander](https://github.com/tkellen/expander) to recursively expand template strings into\ntheir resolved values.\n\n**Params**\n\n* `lookup` **{*}**: Any value to process, usually strings with a cache template, like `<%= foo %>` or `${foo}`.\n* `opts` **{*}**: Options to pass to Lo-Dash `  _.template`.\n\n**Example**\n\n```js\ncache.process({a: '<%= b %>', b: 'c'});\n//=> {a: 'c', b: 'c'}\n```\n\n### [.flattenData](index.js#L122)\n\nIf a `data` property is on the given `data` object\n(e.g. `data.data`, like when files named `data.json`\nor `data.yml` are used), `data.data` is flattened to\njust `data`\n\n**Params**\n\n* `data` **{Object}**\n* `returns` **{Object}**: Flattened object.\n\n### [.extendData](index.js#L136)\n\nExtend the `cache.data` object with the given data. This\nmethod is chainable.\n\n* `returns` **{Object}** `PlasmaCache`: to enable chaining\n\n**Example**\n\n```js\ncache\n  .extendData({foo: 'bar'}, {baz: 'quux'});\n  .extendData({fez: 'bang'});\n```\n\n### [.data](index.js#L165)\n\nExtend the `cache.data` object with data from a JSON\nor YAML file, or by passing an object directly - glob\npatterns or file paths may be used.\n\n**Params**\n* `values` **{Object|Array|String}**: Values to pass to plasma.\n* `process` **{Boolean}**: If `true` is passed as the last argumemnt data will\n* `returns` **{Object}** `PlasmaCache`: to enable chaining\n\n**Example**\n\n```js\ncache\n  .data({a: 'b'})\n  .data({c: 'd'});\n\nconsole.log(cache);\n//=> {data: {a: 'b', c: 'd'}}\n\ncache.data('*.{json,yml}');\n// or\ncache.data('package.json');\n//=> {name: 'plasma-cache', ...}\n\n// process config templates\ncache.data({a: '<%= b %>', b: 'z'})\n//=> {data: {a: 'z', b: 'z'}}\n```\n\n## Related projects\n\n* [config-cache](https://github.com/jonschlinkert/config-cache): General purpose JavaScript object storage methods.\n* [data-store](https://github.com/jonschlinkert/data-store): Easily get, set and persist config data.\n* [option-cache](https://github.com/jonschlinkert/option-cache): Simple API for managing options in JavaScript applications.\n* [plasma](https://github.com/jonschlinkert/plasma): Load data from globs or files or directly from objects.\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/plasma-cache/issues/new)\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 © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 01, 2015._\n","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-06-24T02:42:20.295Z","created":"2015-05-30T08:52:58.761Z","0.1.0":"2015-05-30T08:52:58.761Z","0.1.1":"2015-05-30T08:58:59.687Z","0.1.2":"2015-06-01T04:27:21.611Z","0.2.0":"2015-06-01T06:03:53.875Z","0.2.1":"2015-06-01T07:58:05.596Z","0.2.2":"2015-06-01T08:03:12.204Z"},"homepage":"https://github.com/jonschlinkert/plasma-cache","keywords":["cache","config","data","extend","file","fs","get","hash","json","object","read","set","storage","store","yaml"],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/plasma-cache.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/plasma-cache/issues"},"license":"MIT","readmeFilename":"README.md"}