{"_id":"propget","_rev":"5-a13982033339df65c7ca86fc24139522","name":"propget","description":"Use dot notation to get properties from deeply nested object and array structures.","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"propget","version":"1.0.0","description":"Use dot notation to get properties from deeply nested object and array structures.","main":"index.js","scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/bigpipe/propget.git"},"keywords":["prop","property","get"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/bigpipe/propget/issues"},"homepage":"https://github.com/bigpipe/propget#readme","devDependencies":{"assume":"1.2.x","mocha":"2.2.x","pre-commit":"1.0.x"},"gitHead":"2268079a4181cb93705f73f60b617d0a31421b24","_id":"propget@1.0.0","_shasum":"d003512445efb813eabc29989cd5ecf715679f42","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"dist":{"shasum":"d003512445efb813eabc29989cd5ecf715679f42","tarball":"https://registry.npmjs.org/propget/-/propget-1.0.0.tgz","integrity":"sha512-yzrhg+UYfSwyYjMvgFnZXw7Pyx8X+8AOdvrQY5vs4tsQXSLBvYTtxX5RNzpHKM7/qfpM+8UNJ9yAIj1KrwUzmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvjETNCW7xHp11vdCvwz4wrLO+Dwng7PkuU8OPSBS/ogIhAIXApFr7fni+xIDunCoWbLklZlg4op7/tiZWM1JCURtC"}]},"directories":{}},"1.1.0":{"name":"propget","version":"1.1.0","description":"Use dot notation to get properties from deeply nested object and array structures.","main":"index.js","scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/bigpipe/propget.git"},"keywords":["prop","property","get"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/bigpipe/propget/issues"},"homepage":"https://github.com/bigpipe/propget#readme","devDependencies":{"assume":"1.4.x","mocha":"3.2.x","pre-commit":"1.2.x"},"gitHead":"194bfa11d43f2850c7d7a18ba4b1fada7377d793","_id":"propget@1.1.0","_shasum":"6c1c7ac9a09c05bdb5c967f0cd8e1c09409fef6b","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"dist":{"shasum":"6c1c7ac9a09c05bdb5c967f0cd8e1c09409fef6b","tarball":"https://registry.npmjs.org/propget/-/propget-1.1.0.tgz","integrity":"sha512-0lwYZB5BgJH+dVvVrT/oZxsr2tX0EvO4WAslgikk7pweJMruHpKvJPv0pOG6WM6iUVRV2hyQ/NFwU1KPIJ/55A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF8cqN6QxVY0I36fkFeEIFTtY5KeSJL4davNMcy2/8ZEAiBGapYQh8Y/JjOIu/Y/kzLWWN7Q9C6fxczX32zRwGw3zg=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/propget-1.1.0.tgz_1483375410923_0.5275575704872608"},"directories":{}}},"readme":"# propget\n\nPropget is a small helper utility for finding values/keys in deeply nested\nobjects without having to worry about undefined properties and what not. It uses\na human readable dot based notation to find items in your object or array.\n\n## Installation\n\nJust install it through npm, like you do with the all your code:\n\n```\nnpm install --save propget\n```\n\nIt doesn't use any fancy node.js magic or ES6 so it should be good to go for\nbrowser usage as well using something as browserify.\n\n## Usage\n\nUsing the module is super simple. We export the `propget` method as default\nfunction:\n\n```js\nvar propget = require('propget');\n```\n\nThe function accepts the following arguments:\n\n- `object`, data structure that we need to walk.\n- `string`, dot notated string for deeply nested object access.\n- `..`, rest arguments that will be used for optional function calls.\n\nSo accessing a complex data structure can be as easy as this:\n\n```js\n'use strict';\n\nvar prop = require('propget')\n  , data = { hello: 'world', yo: { deeply: ['nested', 'arrays'] } };\n\nprop(data, 'hello'); // world\nprop(data, 'yo.deeply.1'); // arrays\nprop(data, 'yo.deeply.nested.unknown.keys'); // undefined\n```\n\n#### Function execution\n\nOf one the unique functions of this module is that it allows you to execute\nfunctions that are inside data structure. We can then re-use the result of the\nfunction and walk it further.\n\n```js\ndata = { \n  hello: { \n    world: function () { \n      return { \n        hi: 'hello'\n      };\n    }\n  }\n};\n\nprop(data, 'hello.world().hi') // hello\n```\n\nBut in addition to simple function execution we can also call these functions\nwith arguments. We automatically use the additionally supplied arguments to the\npropget method for this.\n\n```js\ndata = { \n  hello: { \n    world: function (arg) { \n      return { \n        hi: arg\n      };\n    }\n  }\n};\n\nprop(data, 'hello.world(what).hi', 'additional') // additional\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"time":{"modified":"2023-07-12T19:05:18.692Z","created":"2015-06-22T11:57:06.347Z","1.0.0":"2015-06-22T11:57:06.347Z","1.1.0":"2017-01-02T16:43:33.027Z"},"homepage":"https://github.com/bigpipe/propget#readme","keywords":["prop","property","get"],"repository":{"type":"git","url":"git+https://github.com/bigpipe/propget.git"},"author":{"name":"Arnout Kazemier"},"bugs":{"url":"https://github.com/bigpipe/propget/issues"},"license":"MIT","readmeFilename":"README.md","users":{"flumpus-dev":true}}