{"name":"computed-property","description":"Add computed properties to JavaScript objects.","version":"0.1.3","homepage":"https://github.com/doowb/computed-property","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"contributors":[{"name":"Brian Woodward","url":"https://twitter.com/doowb"},{"name":"Gilad Peleg","url":"http://www.giladpeleg.com"}],"repository":{"type":"git","url":"git+https://github.com/doowb/computed-property.git"},"bugs":{"url":"https://github.com/doowb/computed-property/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"get-value":"^0.3.2","lodash.clonedeep":"3.0.1","set-object":"^0.1.0"},"devDependencies":{"benchmarked":"^0.1.3","calculate-assets":"^0.1.2","gulp-format-md":"^0.1.12","lodash":"^3.10.0","mocha":"*","should":"^4.3.0"},"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"gitHead":"2bbc2e7907529160f7662481f87f25bfdbb8a42e","_id":"computed-property@0.1.3","_npmVersion":"5.0.1","_nodeVersion":"6.10.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"integrity":"sha512-ep+qu1T9PCwoGyZna2km59N4QqAuAB8+7m6whca42Idz3tmWkANHI3pGcE6qsxWLV27iWS1U3H+BSq0PpQMcnw==","shasum":"552c30b0c10ea93666d2a24641239d0eae3a59d6","tarball":"http://registry-npm.ywwl.com/computed-property/download/computed-property-0.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/MOaFOlj9qjPEzgHSJKXqYAa52r6d6KsGtGEajk2bvAiAviV6u10mESbpCaprp4XYoPcCHG7sqT614wetLB3Kd4A=="}],"size":3490,"noattachment":false,"key":"/computed-property/-/computed-property-0.1.3.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/computed-property-0.1.3.tgz_1496492710799_0.6925022136420012"},"directories":{},"readme":"# computed-property [![NPM version](https://img.shields.io/npm/v/computed-property.svg?style=flat)](https://www.npmjs.com/package/computed-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/computed-property.svg?style=flat)](https://npmjs.org/package/computed-property)  [![NPM total downloads](https://img.shields.io/npm/dt/computed-property.svg?style=flat)](https://npmjs.org/package/computed-property) [![Linux Build Status](https://img.shields.io/travis/doowb/computed-property.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/computed-property) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/computed-property.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/computed-property)\n\n> Add computed properties to JavaScript objects.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save computed-property\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add computed-property\n```\n\n## Usage\n\n```js\nvar computedProperty = require('computed-property');\n```\n\n## API\n\n### [computedProperty](index.js#L99)\n\nAdd a computed property to an object. This updates the property when dependent properties are updated.\n\n**Params**\n\n* `obj` **{Object}**: Object to add the property to.\n* `property` **{String}**: Name of the property.\n* `dependencies` **{Array}**: Optional list of properties to depend on.\n* `getter` **{Function}**: Getter function that does the calculation.\n\n**Example**\n\n```js\nvar computedProperty = require('computed-property');\nvar file = {\n  name: 'home-page',\n  ext: '.hbs',\n  dirname: 'views',\n  data: {\n    title: 'Home'\n  }\n};\n\ncomputedProperty(\n  // object\n  file,\n  // property name\n  'path',\n  // optional dependencies (may be deeply nested)\n  ['name', 'ext', 'dirname', 'data.title'],\n  // getter function\n  function () {\n    return this.dirname + '/' + this.name + this.ext;\n  });\n```\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 10 | [doowb](https://github.com/doowb) |  \n| 7  | [pgilad](https://github.com/pgilad) |  \n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](https://twitter.com/doowb)\n\n### License\n\nCopyright © 2017, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 03, 2017._","publish_time":1496492711830,"_cnpm_publish_time":1496492711830,"dist-tags":{"latest":"1.0.0"}}