{"_id":"plumb","_rev":"12-b9f7104d586f4b7aecbca09a270ac2ce","name":"plumb","description":"functional composition sugar","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"plumb","version":"0.1.0","description":"functional composition sugar","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"git@github.com:AgileDiagnosis/plumb.git"},"keywords":["functional","compose","composition"],"author":{"name":"Agile Diagnosis","email":"hello@agilediagnosis.com"},"license":"MIT","devDependencies":{"sinon-chai":"~2.4.0","chai":"~1.5.0","mocha":"~1.9.0","sinon":"~1.6.0"},"_id":"plumb@0.1.0","dist":{"shasum":"4c57790a509692832fdbf10dfaddd7948c5cb574","tarball":"https://registry.npmjs.org/plumb/-/plumb-0.1.0.tgz","integrity":"sha512-m0/luIuyx9EmvbT6284YVeMk4OFeyOYILL0/dOvBaiMlv9pTKMiMvX7mLvjoIje/PesdMfp/8ABV9x4x8reLHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQfuCof+n0y2tYTMC09EP26I0b//vCpYBxB7YjogrlvAiB0MRZCzG4Mv+qwm0bj/M6W6tbgOKQGGZuOKnz1TsW/CQ=="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"jden","email":"jason@denizac.org"},"maintainers":[{"name":"jden","email":"jason@denizac.org"}]}},"readme":"# plumb\nfunctional composition sugar\n\n## usage\n\n    var plumb = require('plumb')\n\n    var reverseString = plumb(\n      plumb.invoke('split')\n      plumb.invoke('reverse')\n      plumb.invoke('join','')\n    )\n    // => Function\n\n    reverseString('hello')\n    // => \"olleh\"\n\n## api\n\nUsing [jsig notation](https://github.com/jden/jsig)\n\n### `plumb(...fns: Function) => (val: Value) => Value`\n\nReutrns a function composing each of the argument functions in order. The return value of each function is used as the argument for each successive function.\n\n### `plumb.pipe(val: Value, ...fns: Function) => Value`\n\nImmediately invoke a composition of functions `fns` on the value `val`. It helps me to think about `fns` as a crazy pachinko machine and `val` as the ball going in.\n\nEquivalent to `plumb(fns)(val)`\n\n### `plumb.invoke(methodName: String, ...args?: Value) => Function`\n\nCreates a function which invokes a method on an object, optionally with fixed arguments.\n\nExample:\n\n    plumb.invoke('foo','bar')\n\nreturns the equivalent of\n\n    function callFoo(obj) {\n      return obj.foo('bar')\n    }\n\n### `plumb.tap(fn: Function) => (Value) => Value`\n\nCreate a function which passes a value through (identity) and calls a function `fn` with that value.\n\nExample:\n\n    var log = plumb.tap(function (x) { console.log(x)})\n\n    log(10)\n    // => 10\n    // side effect: console.log(10) was called\n\n## installation\n\n    $ npm install plumb\n\n## running the tests\n\nFrom project root:\n\n    $ npm install\n    $ npm test\n\n## contributors\n\njden <jason@denizac.org>\n\n## license\n\nMIT. (c) 2013 Agile Diagnosis <hello@agilediagnosis.com> See LICENSE.md\n\n\"...and visions of sugarplums danced in their heads\"","maintainers":[],"time":{"modified":"2022-06-24T04:18:22.210Z","created":"2013-04-29T18:52:36.380Z","0.1.0":"2013-04-29T18:52:37.304Z"},"author":{"name":"Agile Diagnosis","email":"hello@agilediagnosis.com"},"repository":{"type":"git","url":"git@github.com:AgileDiagnosis/plumb.git"},"readmeFilename":"README.md","keywords":["functional","compose","composition"],"license":"MIT"}