{"_id":"methmeth","_rev":"293879","name":"methmeth","description":"Execute a method out from an object.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"stephenplusplus","email":""}],"time":{"modified":"2021-06-03T18:54:43.000Z","created":"2014-04-15T21:52:01.021Z","1.1.0":"2015-07-30T21:16:10.769Z","1.0.0":"2015-07-21T17:34:58.293Z","0.1.0":"2014-04-15T21:52:01.021Z"},"users":{},"author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://stephenplusplus.com"},"repository":{"type":"git","url":"git+https://github.com/stephenplusplus/methmeth.git"},"versions":{"1.1.0":{"name":"methmeth","version":"1.1.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://stephenplusplus.com"},"description":"Execute a method out from an object.","repository":{"type":"git","url":"git+https://github.com/stephenplusplus/methmeth.git"},"license":"MIT","main":"index.js","files":["index.js","license"],"keywords":["prop","property","pluck","method","meth","execute","array","iterator"],"devDependencies":{"mocha":"^2.2.5"},"scripts":{"test":"mocha"},"gitHead":"60a0af67d47a8f54c181e32d9f397242c03e9293","bugs":{"url":"https://github.com/stephenplusplus/methmeth/issues"},"homepage":"https://github.com/stephenplusplus/methmeth#readme","_id":"methmeth@1.1.0","_shasum":"e80a26618e52f5c4222861bb748510bd10e29089","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"e80a26618e52f5c4222861bb748510bd10e29089","size":1747,"noattachment":false,"key":"/methmeth/-/methmeth-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/methmeth/download/methmeth-1.1.0.tgz"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1438290970769,"_cnpm_publish_time":1438290970769,"_hasShrinkwrap":false},"1.0.0":{"name":"methmeth","version":"1.0.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://stephenplusplus.com"},"description":"Execute a method out from an object.","repository":{"type":"git","url":"git+https://github.com/stephenplusplus/methmeth.git"},"license":"MIT","main":"index.js","files":["index.js","license"],"keywords":["prop","property","pluck","method","meth","execute","array","iterator"],"devDependencies":{"mocha":"^2.2.5"},"scripts":{"test":"mocha"},"gitHead":"c84420b73c5378983c2f0fb598a6eb5ed4ad1878","bugs":{"url":"https://github.com/stephenplusplus/methmeth/issues"},"homepage":"https://github.com/stephenplusplus/methmeth#readme","_id":"methmeth@1.0.0","_shasum":"791e9aacdfefea11642da36ad8af53321c04c958","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"791e9aacdfefea11642da36ad8af53321c04c958","size":1711,"noattachment":false,"key":"/methmeth/-/methmeth-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/methmeth/download/methmeth-1.0.0.tgz"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1437500098293,"_cnpm_publish_time":1437500098293,"_hasShrinkwrap":false},"0.1.0":{"name":"methmeth","version":"0.1.0","author":{"name":"Stephen Sawchuk","email":"sawchuk@gmail.com","url":"http://sawchuk.me"},"description":"Just a helper for calling a method out of an object.","repository":{"type":"git","url":"git://github.com/stephenplusplus/methmeth"},"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/methmeth/issues"},"homepage":"https://github.com/stephenplusplus/methmeth","_id":"methmeth@0.1.0","dist":{"shasum":"4e129b51c05d5d983ff272604d6652bc1d0f8c39","size":1787,"noattachment":false,"key":"/methmeth/-/methmeth-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/methmeth/download/methmeth-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"maintainers":[{"name":"stephenplusplus","email":""}],"directories":{},"publish_time":1397598721021,"_cnpm_publish_time":1397598721021,"_hasShrinkwrap":false}},"readme":"# methmeth\n> Call a method on an object in an Array.prototype callback.\n\n\n```sh\n$ npm install --save methmeth\n```\n```js\nvar meth = require('methmeth');\n\nvar friends = [\n  {\n    name: 'passy',\n    hobby: 'carrots',\n    getInfo: function () {\n      return this.name + ' likes ' + this.hobby;\n    }\n  },\n  {\n    name: 'sindre',\n    vehicle: 'unicorn taxi',\n    getInfo: function () {\n      return this.name + ' drives a ' + this.vehicle;\n    }\n  },\n  {\n    name: 'addy',\n    invented: 'google *',\n    getInfo: function () {\n      return this.name + ' created ' + this.invented;\n    }\n  }\n];\n```\n\n#### Before\n```js\nvar myFriends = friends.map(function (item) {\n  return item.getInfo();\n}).join('\\n');\n// passy likes carrots\n// sindre drives a unicorn taxi\n// addy created google *\n```\n\n#### After\n```js\nfriends.map(meth('getInfo')).join('\\n');\n// passy likes carrots\n// sindre drives a unicorn taxi\n// addy created google *\n```\n\n#### Pre-fill arguments\n```js\nvar friends = [\n  {\n    name: 'dave',\n    passion: 'dried mango',\n    getInfo: function (emotion) {\n      return this.name + ' loves ' + this.passion + emotion;\n    }\n  }\n];\n\nfriends.map(meth('getInfo', '!!!!')).join('\\n');\n// dave loves dried mango!!!!\n```\n\n#### Related\n\n- [propprop](https://github.com/stephenplusplus/propprop) - Pluck a property out of an object in an Array.prototype callback.\n","_attachments":{},"homepage":"https://github.com/stephenplusplus/methmeth#readme","bugs":{"url":"https://github.com/stephenplusplus/methmeth/issues"},"license":"MIT"}