{"_id":"pull-pair","_rev":"8-fd04af411003dec544a6feee4b593888","name":"pull-pair","description":"pair a source pull-stream and a sink pull-stream","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"pull-pair","description":"pair a source pull-stream and a sink pull-stream","version":"1.0.0","homepage":"https://github.com/dominictarr/pull-pair","repository":{"type":"git","url":"git://github.com/dominictarr/pull-pair.git"},"devDependencies":{"tape":"~1.0.4","pull-stream":"~2.20.1"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"license":"MIT","bugs":{"url":"https://github.com/dominictarr/pull-pair/issues"},"_id":"pull-pair@1.0.0","dist":{"shasum":"b5ee1269a265266d2585205ce92ec0e88d5a19dc","tarball":"https://registry.npmjs.org/pull-pair/-/pull-pair-1.0.0.tgz","integrity":"sha512-AoZuubyDKV0f9eCXzIF035I6wNy9frwXZTjF/DD7tmc/LYsYKjV3j1M80WrVUmqg+mqYRKqp78uVQ12YTPWuQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPvkTN1EjMPcyrP6U0AmgXlGR9TwuhNoTS9h96phf0WAiEAx8x9gUCxHSUgSUuC7X92FvIIgtImh7fZ2QoWr6wfFMg="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"1.1.0":{"name":"pull-pair","description":"pair a source pull-stream and a sink pull-stream","version":"1.1.0","homepage":"https://github.com/dominictarr/pull-pair","repository":{"type":"git","url":"git://github.com/dominictarr/pull-pair.git"},"devDependencies":{"pull-stream":"^3.2.0","tape":"^4.5.1"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"license":"MIT","gitHead":"e2db349b4bcd8936b994e21b4d33dad5b6e3fbb2","bugs":{"url":"https://github.com/dominictarr/pull-pair/issues"},"_id":"pull-pair@1.1.0","_shasum":"7ee427263fdf4da825397ac0a05e1ab4b74bd76d","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"dist":{"shasum":"7ee427263fdf4da825397ac0a05e1ab4b74bd76d","tarball":"https://registry.npmjs.org/pull-pair/-/pull-pair-1.1.0.tgz","integrity":"sha512-7VEFLxWnj2AKaN3AvtyaM508d1+56/ulSjDLu4j6kcd9DnEM6LfG8b1R9gCLqzIjJo5stFrWynVc6e451OW4LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVBTfba96DIllPJkRibZRxiCpJlZ2RayMFjmx8xMPZswIgF41hXiTUYzK0WXNQtUcZZnaNF4faQ9e11gg9A5Eyjok="}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pull-pair-1.1.0.tgz_1457839438978_0.08230053540319204"},"directories":{}}},"readme":"# pull-pair\n\nA pair of {source, sink} streams that are internally connected,\n(what goes into the sink comes out the source)\n\nThis can be used to construct pipelines that are connected.\n\n``` js\nvar pull = require('pull-stream')\nvar pair = require('pull-pair')\n\nvar p = pair()\n\n//read values into this sink...\npull(pull.values([1, 2, 3]), p.sink)\n\n//but that should become the source over here.\npull(p.source, pull.collect(function (err, values) {\n  if(err) throw err\n  console.log(values) //[1, 2, 3]\n}))\n\n```\n\nThis is particularily useful for creating duplex streams especilaly\naround servers. Use `pull-pair/duplex` to get two duplex streams\nthat are attached to each other.\n\n``` js\nvar DuplexPair = require('pull-pair/duplex')\n\nvar d = DuplexPair()\n\n//the \"client\": pipe to the first duplex and get the response.\npull(\n  pull.values([1,2,3]),\n  d[0],\n  pull.collect(console.log) // => 10, 20, 30\n)\n\n//the \"server\": pipe from the second stream back to itself\n//(in this case) appling a transformation.\npull(\n  d[1],\n  pull.map(function (e) {\n    return e*10\n  }),\n  d[1]\n)\n```\n\n## License\n\nMIT\n\n","maintainers":[{"email":"dominic.tarr@gmail.com","name":"dominictarr"},{"email":"arj03@protonmail.ch","name":"arj03"}],"time":{"modified":"2022-06-25T00:39:29.537Z","created":"2013-12-08T09:08:35.762Z","1.0.0":"2013-12-08T09:08:53.363Z","1.1.0":"2016-03-13T03:23:59.434Z"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/pull-pair.git"},"homepage":"https://github.com/dominictarr/pull-pair","bugs":{"url":"https://github.com/dominictarr/pull-pair/issues"},"license":"MIT","readmeFilename":"README.md"}