{"_id":"tea-properties","_rev":"240927","name":"tea-properties","description":"Deep object inspection and modification given a stringed path.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jakeluer","email":""}],"time":{"modified":"2021-06-03T15:56:36.000Z","created":"2012-11-13T22:31:19.963Z","0.1.1":"2013-10-25T19:26:00.404Z","0.1.0":"2012-11-13T22:31:19.963Z"},"users":{},"author":{"name":"Jake Luer","email":"jake@qualiancy.com","url":"http://qualiancy.com"},"repository":{"type":"git","url":"git@github.com:qualiancy/tea-properties.git"},"versions":{"0.1.1":{"name":"tea-properties","version":"0.1.1","description":"Deep object inspection and modification given a stringed path.","author":{"name":"Jake Luer","email":"jake@qualiancy.com","url":"http://qualiancy.com"},"license":"MIT","keywords":[],"repository":{"type":"git","url":"git@github.com:qualiancy/tea-properties.git"},"engines":{"node":"*"},"main":"./index","scripts":{"test":"make test"},"dependencies":{},"devDependencies":{"chai":"*","component":"*","mocha":"*","mocha-phantomjs":"*"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/qualiancy/tea-properties/issues"},"_id":"tea-properties@0.1.1","dist":{"shasum":"0e06618e37eacb813dd8e4a3bee541f5a098609e","size":3059,"noattachment":false,"key":"/tea-properties/-/tea-properties-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tea-properties/download/tea-properties-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jakeluer","email":"jake@alogicalparadox.com"},"maintainers":[{"name":"jakeluer","email":""}],"directories":{},"publish_time":1382729160404,"_cnpm_publish_time":1382729160404,"_hasShrinkwrap":false},"0.1.0":{"name":"tea-properties","version":"0.1.0","description":"Deep object inspection and modification given a stringed path.","author":{"name":"Jake Luer","email":"jake@qualiancy.com","url":"http://qualiancy.com"},"license":"MIT","keywords":[],"repository":{"type":"git","url":"git@github.com:qualiancy/tea-properties.git"},"engines":{"node":"*"},"main":"./index","scripts":{"test":"make test"},"dependencies":{},"devDependencies":{"chai":"*","component":"*","mocha":"*","mocha-phantomjs":"*"},"_id":"tea-properties@0.1.0","dist":{"shasum":"c5c81533da19f3c39afadd15c173a3b6cbc8d1eb","size":2992,"noattachment":false,"key":"/tea-properties/-/tea-properties-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tea-properties/download/tea-properties-0.1.0.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"jakeluer","email":"jake@alogicalparadox.com"},"maintainers":[{"name":"jakeluer","email":""}],"directories":{},"publish_time":1352845879963,"_cnpm_publish_time":1352845879963,"_hasShrinkwrap":false}},"readme":"# tea-properties [![Build Status](https://secure.travis-ci.org/qualiancy/tea-properties.png?branch=master)](https://travis-ci.org/qualiancy/tea-properties)\n\n> Deep object inspection and modification given a stringed path.\n\n## Installation\n\n### Node.js\n\n`tea-properties` is available on [npm](http://npmjs.org).\n\n    $ npm install tea-properties\n\n### Component\n\n`tea-properties` is available as a [component](https://github.com/component/component).\n\n    $ component install qualiancy/tea-properties\n\n## Usage\n\n### .get(obj, path)\n\n* **@param** _{Object}_ object \n* **@param** _{String}_ path \n* **@return** _{Object}_  value or `undefined`\n\nRetrieve the value in an object given a string path.\n\n```js\nvar obj = {\n    prop1: {\n        arr: ['a', 'b', 'c']\n      , str: 'Hello'\n    }\n  , prop2: {\n        arr: [ { nested: 'Universe' } ]\n      , str: 'Hello again!'\n    }\n};\n```\n\nThe following would be the results.\n\n```js\nvar properties = require('tea-properties');\nproperties.get(obj, 'prop1.str'); // Hello\nproperties.get(obj, 'prop1.att[2]'); // b\nproperties.get(obj, 'prop2.arr[0].nested'); // Universe\n```\n\n\n### .set(path, value, object)\n\n* **@param** _{Object}_ object \n* **@param** _{String}_ path \n* **@param** _{Mixed}_ value \n\nDefine the value in an object at a given string path.\n\n```js\nvar obj = {\n    prop1: {\n        arr: ['a', 'b', 'c']\n      , str: 'Hello'\n    }\n  , prop2: {\n        arr: [ { nested: 'Universe' } ]\n      , str: 'Hello again!'\n    }\n};\n```\n\nThe following would be acceptable.\n\n```js\nvar properties = require('tea-properties');\nproperties.set(obj, 'prop1.str', 'Hello Universe!');\nproperties.set(obj, 'prop1.arr[2]', 'B');\nproperties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' });\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Jake Luer <jake@qualiancy.com> (http://qualiancy.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_attachments":{},"readmeFilename":"README.md","bugs":{"url":"https://github.com/qualiancy/tea-properties/issues"},"license":"MIT"}