{"name":"computed-property","description":"Add computed properties to JavaScript objects.","version":"0.1.2","homepage":"https://github.com/doowb/computed-property","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git://github.com/doowb/computed-property.git"},"bugs":{"url":"https://github.com/doowb/computed-property/issues"},"licenses":[{"type":"MIT","url":"https://github.com/doowb/computed-property/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"benchmarked":"^0.1.3","calculate-assets":"^0.1.2","mocha":"*","should":"^4.3.0"},"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"dependencies":{"get-value":"^0.3.2","lodash":"^2.4.1","set-object":"^0.1.0"},"gitHead":"15d8e4df3b4e3786904ff920796806c63228e116","_id":"computed-property@0.1.2","_shasum":"4ddcb40ea6925c0b1ed7b85ebcd054ae3c57dd32","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"}],"dist":{"shasum":"4ddcb40ea6925c0b1ed7b85ebcd054ae3c57dd32","tarball":"http://registry-npm.ywwl.com/computed-property/download/computed-property-0.1.2.tgz","integrity":"sha512-S8LxBGItaKqTwqvnmFHrlsrHYpaLsuu5MsLZzH0Rm2l06iHyX1m0+qZSNWkj9/gDsP5f9vVe44AKvXlKm1B2cw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOB4atFvViTwkHpVcqSiLpVvsId8yfkTdV93iaMsIEIAiAssDtmcU3wbc1kWMZIHJyWOJblXjQXtNT7b+oaqmpo/g=="}],"size":3712,"noattachment":false,"key":"/computed-property/-/computed-property-0.1.2.tgz"},"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":1418935442202,"_cnpm_publish_time":1418935442202,"dist-tags":{"latest":"1.0.0"}}