{"_id":"propprop","_rev":"293890","name":"propprop","description":"Just a helper for plucking a property out of an object.","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"stephenplusplus","email":""}],"time":{"modified":"2021-06-03T18:54:44.000Z","created":"2014-04-07T19:10:43.528Z","0.3.1":"2016-07-12T13:53:41.178Z","0.3.0":"2014-04-14T18:47:50.959Z","0.2.0":"2014-04-08T19:43:46.296Z","0.1.0":"2014-04-07T19:10:43.528Z"},"users":{},"author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/stephenplusplus/propprop.git"},"versions":{"0.3.1":{"name":"propprop","version":"0.3.1","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com"},"license":"MIT","description":"Just a helper for plucking a property out of an object.","repository":{"type":"git","url":"git+https://github.com/stephenplusplus/propprop.git"},"scripts":{"browser":"a=$npm_package_name; browserify -r ./index:$a -s $a index.js -o browser.js"},"files":["index.js"],"keywords":["prop","property","pluck"],"devDependencies":{"browserify":"^3.0.0"},"gitHead":"ed91e3146e8c90fb50b61eac37c66367b55a5a22","bugs":{"url":"https://github.com/stephenplusplus/propprop/issues"},"homepage":"https://github.com/stephenplusplus/propprop#readme","_id":"propprop@0.3.1","_shasum":"a049a3568b896440067d15d8ec9f33735e570178","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"a049a3568b896440067d15d8ec9f33735e570178","size":1985,"noattachment":false,"key":"/propprop/-/propprop-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/propprop/download/propprop-0.3.1.tgz"},"maintainers":[{"name":"stephenplusplus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/propprop-0.3.1.tgz_1468331619420_0.7816366874612868"},"directories":{},"publish_time":1468331621178,"_cnpm_publish_time":1468331621178,"_hasShrinkwrap":false},"0.3.0":{"name":"propprop","version":"0.3.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://sawchuk.me"},"description":"Just a helper for plucking a property out of an object.","repository":{"type":"git","url":"git://github.com/stephenplusplus/propprop"},"scripts":{"browser":"a=$npm_package_name; browserify -r ./index:$a -s $a index.js -o browser.js"},"files":["index.js"],"keywords":["prop","property","pluck"],"devDependencies":{"browserify":"^3.0.0"},"bugs":{"url":"https://github.com/stephenplusplus/propprop/issues"},"homepage":"https://github.com/stephenplusplus/propprop","_id":"propprop@0.3.0","dist":{"shasum":"78e396cc1e652685ae2bf452a6690644786dd258","size":1796,"noattachment":false,"key":"/propprop/-/propprop-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/propprop/download/propprop-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1397501270959,"_cnpm_publish_time":1397501270959,"_hasShrinkwrap":false},"0.2.0":{"name":"propprop","version":"0.2.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://sawchuk.me"},"description":"Just a helper for plucking a property out of an object.","repository":{"type":"git","url":"git://github.com/stephenplusplus/propprop"},"scripts":{"browser":"a=$npm_package_name; browserify -r ./index:$a -s $a index.js -o browser.js"},"files":["index.js"],"keywords":["prop","property","pluck"],"devDependencies":{"browserify":"^3.0.0"},"bugs":{"url":"https://github.com/stephenplusplus/propprop/issues"},"homepage":"https://github.com/stephenplusplus/propprop","_id":"propprop@0.2.0","dist":{"shasum":"fb85555e3a765090bd63403eae60521484bd944b","size":1793,"noattachment":false,"key":"/propprop/-/propprop-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/propprop/download/propprop-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1396986226296,"_cnpm_publish_time":1396986226296,"_hasShrinkwrap":false},"0.1.0":{"name":"propprop","version":"0.1.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://sawchuk.me"},"description":"Just a helper for plucking a property out of an object.","repository":{"type":"git","url":"git://github.com/stephenplusplus/propprop"},"scripts":{"browser":"a=$npm_package_name; browserify -r ./index:$a -s $a index.js -o browser.js"},"files":["index.js"],"keywords":["prop","property","pluck"],"devDependencies":{"browserify":"^3.0.0"},"bugs":{"url":"https://github.com/stephenplusplus/propprop/issues"},"homepage":"https://github.com/stephenplusplus/propprop","_id":"propprop@0.1.0","dist":{"shasum":"cd009e7c1043f4d4dd8729cd1be86b0d9c08192e","size":1860,"noattachment":false,"key":"/propprop/-/propprop-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/propprop/download/propprop-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1396897843528,"_cnpm_publish_time":1396897843528,"_hasShrinkwrap":false}},"readme":"# propprop\n> pluck a property out of an object.\n\n\n#### Before\n```js\nvar friendsAsJavaScriptLibraries = [\n  {\n    name: 'passy.js',\n    hobby: 'clay'\n  },\n  {\n    name: 'sindre.js',\n    vehicle: 'unicorn taxi'\n  },\n  {\n    name: 'addy.js',\n    invented: 'google *'\n  }\n];\n\nvar names = friendsAsJavaScriptLibraries.map(function (item) {\n  return item.name;\n});\n```\n\n#### After\n```js\nvar friendsAsJavaScriptLibraries = [ /* ... */ ];\n\nvar names = friendsAsJavaScriptLibraries.map(prop('name'));\n```\n\nThe benefit is more noticeable when you're using multiple [Array.prototype](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype) methods to shape your objects:\n\n```js\nvar friendsAsJavaScriptLibraries = [ /* ... */ ];\nvar urls;\n\nif (friendsAsJavaScriptLibraries.every(prop('name'))) {\n  urls = friendsAsJavaScriptLibraries\n    .map(function (item) {\n      item.url = 'https://github.com/magical-library-land/' + item.name;\n      return item;\n    })\n    .map(prop('url'));\n}\n```\n\n\n## Why?\nPerhaps you're already using [Lo-Dash](http://lodash.com), [Underscore.js](http://underscorejs.org), or another utility library. This should not supplement those libraries, and definitely cannot replace. This is better suited towards applications that don't want to carry the weight and/or functionality of such libraries, and just want something simple and modular.\n\n\n## Install\n`prop` can be used in the browser or within your Node.js apps.\n\n#### Browser\n```bash\n$ bower install --save propprop\n```\n```html\n<script src=\"bower_components/propprop/browser.js\"></script>\n```\n\n#### Node.js\n```bash\n$ npm install --save propprop\n```\n```js\nvar prop = require('propprop');\n```\n\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [Stephen Sawchuk](http://sawchuk.me)\n","_attachments":{},"homepage":"https://github.com/stephenplusplus/propprop#readme","bugs":{"url":"https://github.com/stephenplusplus/propprop/issues"},"license":"MIT"}