{"_id":"duplex","_rev":"30-ab39939a28e8bff142a09f29be4ff02d","name":"duplex","description":"base class for a duplex stream","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.0.1","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"readme":"","_id":"duplex@0.0.1","dist":{"shasum":"4b0152627ee5c820160c45dfe058a2e34d2704d8","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.0.1.tgz","integrity":"sha512-LfXCiDa5NF0ch3E1Io7TkZbsFpEIU9IeFeaItf1vTtvaFRoAM5xWTDW//17e8dp3V1Ha9+TMd+lUHuwwiFSnTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVe3yWfXvtqPsnn/CMZ5ZAznm2VjpZNgnG42aadHDOZAiEAth2Ai6Tr+/y02eT3dyH4SNoFO6BpsLsSqgC7LSUMh3o="}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.1.0":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.1.0","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"readme":"","_id":"duplex@0.1.0","dist":{"shasum":"6f8a4182a49899e3bb73c1ce798ba24c0c6e20ce","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.1.0.tgz","integrity":"sha512-yTZ1T69ZMrnATkoXg4h2Q6WsVK8armMyvvfHtOnNddXn3/3IRU3+1K2Yt0FBuOaKh6PMfs23GaUrkbqddShkXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEs6St2AqtpS5tGZiBqNipa3ckahK5WYfBuSjkI9p4FdAiEA8n0ZipG9pXaf1nscTwsiBakdSdyMoHNdI0CBPTrkAEE="}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.1.1":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.1.1","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"readme":"# duplex\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('write', function (data) {\n    d.sendData(data)\n  })\n  .on('ended', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('write', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('ended', function ())\n\nEmitted when `end()` is called\n\n### sendData(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if there the stream is not paused.\n\n### sendEnd()\n\nEmit `'end'` after the output buffer drains.  \nWill be emitted immediately, it the buffer is empty.\n\n### pause()\n\nSet the readable side of the stream into paused state.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nSet the reabable side of the stream into the unpaused state.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## Automatic Behaviours\n\n`destroy()` is called automitically after both sides of the stream has ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\nThe stream will call `resume()` in the next tick, unless `pause()` is called manually.\nif `resume()` is manually called before the next tick, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.1.1","dist":{"shasum":"de9c7dcf89c4dd87352c169fe3bc86e9f63cba62","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.1.1.tgz","integrity":"sha512-YDSIBEfVN7yLXsGORBBHKPfltfjbLNVKYYhytGA0R7gZf2gCHXgkBawBJ8Vd7Sgt+8PCL9kVHJFGJKaESyp+VQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn3KdKz0G0bPhlhEC1hvbOPN7rAUh85yGGDAhTCwLHQgIhAJ51KuDJAJZyFweOXx/T+p1DFh53T33PCzgl5srVBZPq"}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.1.2":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.1.2","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"readme":"# duplex\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('write', function (data) {\n    d.sendData(data)\n  })\n  .on('ended', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('write', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('ended', function ())\n\nEmitted when `end()` is called\n\n### sendData(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if there the stream is not paused.\n\n### sendEnd()\n\nEmit `'end'` after the output buffer drains.  \nWill be emitted immediately, it the buffer is empty.\n\n### pause()\n\nSet the readable side of the stream into paused state.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nSet the reabable side of the stream into the unpaused state.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## Automatic Behaviours\n\n`destroy()` is called automitically after both sides of the stream has ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\nThe stream will call `resume()` in the next tick, unless `pause()` is called manually.\nif `resume()` is manually called before the next tick, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.1.2","dist":{"shasum":"0d8d0dd246b0b4a78ba66701fc16aa8978888165","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.1.2.tgz","integrity":"sha512-Qsrlz3E2ORHBCoFAC0LMP1b7WM+oBrFAVk23g1RuN22xfXDCHxH9kS4/Umri4vWX5rONvHJ8zJaffrBbs60XKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwM2B2m3CmPl56GG7naQm3tfFxa0emKAZM4DyHojNExAiEAmXNvGZ8ARbg3u94SXqYJi7nKfedkayDwGvJlN7LRzUw="}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.1.3":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.1.3","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('write', function (data) {\n    d.sendData(data)\n  })\n  .on('ended', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('write', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('ended', function ())\n\nEmitted when `end()` is called\n\n### sendData(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if there the stream is not paused.\n\n### sendEnd()\n\nEmit `'end'` after the output buffer drains.  \nWill be emitted immediately, it the buffer is empty.\n\n### pause()\n\nSet the readable side of the stream into paused state.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nSet the reabable side of the stream into the unpaused state.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## Automatic Behaviours\n\n`destroy()` is called automitically after both sides of the stream has ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\nThe stream will call `resume()` in the next tick, unless `pause()` is called manually.\nif `resume()` is manually called before the next tick, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.1.3","dist":{"shasum":"d1a0dd6c6f8eaa017b7c59f07676c26afdfdfe18","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.1.3.tgz","integrity":"sha512-1P38JOIpOy6Ffo2nZbTi81Z2P6KacC8cECtpd+oQDajSpSS0gDG8HyDFX8u+EHcqpm0Nx0YT0Xg+/VutYzPdig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAl3k4eEJt4AYgvFDplo/+GgnjJPUGpQHiiSWIfUqr+IAiBzAM7DO7NbqDIfZ3H8p83/e86pPnR4CvI/yNLKTu4yzg=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.1.4":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.1.4","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('write', function (data) {\n    d.sendData(data)\n  })\n  .on('ended', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('write', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('ended', function ())\n\nEmitted when `end()` is called\n\n### sendData(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if there the stream is not paused.\n\n### sendEnd()\n\nEmit `'end'` after the output buffer drains.  \nWill be emitted immediately, it the buffer is empty.\n\n### pause()\n\nSet the readable side of the stream into paused state.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nSet the reabable side of the stream into the unpaused state.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## Automatic Behaviours\n\n`destroy()` is called automitically after both sides of the stream has ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\nThe stream will call `resume()` in the next tick, unless `pause()` is called manually.\nif `resume()` is manually called before the next tick, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.1.4","dist":{"shasum":"9ee2006ac30eeebc168fa0b6a39306ce2d2c04f4","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.1.4.tgz","integrity":"sha512-BRwgWw4cQS/ENVjRPlLmSlAb03mNEkF8L5LUZpP+B6CYoRO8u0nMExiSxMMBa/lNLdbM9BQhkSe8D2hTs+f69Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICvBnC6YZd8MotDIyHnJDt4T4EAPukj1zFAg9464T3eNAiEA8k5I1jl8tBexQ0W+9SZCPcJC6w+WtVtDhODN4D3dMwY="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.2.0":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.2.0","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('write', function (data) {\n    d.sendData(data)\n  })\n  .on('ended', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('write', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('ended', function ())\n\nEmitted when `end()` is called\n\n### sendData(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if there the stream is not paused.\n\n### sendEnd()\n\nEmit `'end'` after the output buffer drains.  \nWill be emitted immediately, it the buffer is empty.\n\n### pause()\n\nSet the readable side of the stream into paused state.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nSet the reabable side of the stream into the unpaused state.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## Automatic Behaviours\n\n`destroy()` is called automitically after both sides of the stream has ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\nThe stream will call `resume()` in the next tick, unless `pause()` is called manually.\nif `resume()` is manually called before the next tick, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.2.0","dist":{"shasum":"01fba39774ecfdbb307c336453c1b7c0844bcc92","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.2.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.2.1":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.2.1","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('_data', function (data) {\n    d.sendData(data)\n  })\n  .on('_end', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('_data', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('_end', function ())\n\nEmitted when `end()` is called\n\n### _data(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if the stream is not paused.\n\n### _end()\n\nCap the output buffer. no more data events may be added.\n`'end'` will be emitted after the buffer drains, \nor immediately, if the stream is unpaused.\n\n### pause()\n\nPause the readable side of the stream.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nUnpause the readable side of the stream.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## _pause(), emit('pause')\n\nPause the writable side of the stream. this will cause write() to return false,\nso any streams piping into this stream will pause after thier next write.\n\n## emit('drain')\n\nUnpause the writable side of the stream. This will cause `Stream#pipe` to call `resume()`\non any streams piping to this stream.\n\n## Automatic Behaviours\n\n`destroy()` is called automatically after both sides of the stream have ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\n`resume()` will be called on `nextTick`, unless `pause()` was called manually.\nIf `resume()` is manually called before the `nextTick`, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.2.1","dist":{"shasum":"5be04b1176a8d6896a1ad55be7fd275466d10a04","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.2.1.tgz","integrity":"sha512-SljCuOTn4XuSU/+Q4qOPnaEgYm+vHOJh9rZGWAVBve6xOYlJwLiIQ+hi9ATIv8BUBi6Vwym0174kOL+aKSErDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHqasaLSdhMOAx1cTIIiet7udcWrZlA2M+dDEIRh2KAgIgHdngvpuJWeQMyzhawM+6bOmRwcUCUe7jwny/HVIDNBE="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.2.2":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.2.2","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('_data', function (data) {\n    d.sendData(data)\n  })\n  .on('_end', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('_data', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('_end', function ())\n\nEmitted when `end()` is called\n\n### _data(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if the stream is not paused.\n\n### _end()\n\nCap the output buffer. no more data events may be added.\n`'end'` will be emitted after the buffer drains, \nor immediately, if the stream is unpaused.\n\n### pause()\n\nPause the readable side of the stream.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nUnpause the readable side of the stream.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## _pause(), emit('pause')\n\nPause the writable side of the stream. this will cause write() to return false,\nso any streams piping into this stream will pause after thier next write.\n\n## emit('drain')\n\nUnpause the writable side of the stream. This will cause `Stream#pipe` to call `resume()`\non any streams piping to this stream.\n\n## Automatic Behaviours\n\n`destroy()` is called automatically after both sides of the stream have ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\n`resume()` will be called on `nextTick`, unless `pause()` was called manually.\nIf `resume()` is manually called before the `nextTick`, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.2.2","dist":{"shasum":"c31cfde553dc96121169a3f4e14054e351959d43","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.2.2.tgz","integrity":"sha512-PdqGzGFp7JoBNn31cVmhB8EBx916OnmhQSEx2rQSt8v6KAQtoahJG2Se6UQJELdTh14R5BuCUb3gK/CDISjmeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBlUqR1y6jnvEvSWcDgntJNd+yHZFvpp0eU5Qt6W6/4FAiBOs4srkac3GnbO+j56yO8AMmyMqBSIDhLA6rxEvARoqQ=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"0.2.4":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"0.2.4","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('_data', function (data) {\n    d.sendData(data)\n  })\n  .on('_end', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('_data', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('_end', function ())\n\nEmitted when `end()` is called\n\n### _data(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if the stream is not paused.\n\n### _end()\n\nCap the output buffer. no more data events may be added.\n`'end'` will be emitted after the buffer drains, \nor immediately, if the stream is unpaused.\n\n### pause()\n\nPause the readable side of the stream.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nUnpause the readable side of the stream.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## _pause(), emit('pause')\n\nPause the writable side of the stream. this will cause write() to return false,\nso any streams piping into this stream will pause after thier next write.\n\n## emit('drain')\n\nUnpause the writable side of the stream. This will cause `Stream#pipe` to call `resume()`\non any streams piping to this stream.\n\n## Automatic Behaviours\n\n`destroy()` is called automatically after both sides of the stream have ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\n`resume()` will be called on `nextTick`, unless `pause()` was called manually.\nIf `resume()` is manually called before the `nextTick`, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@0.2.4","dist":{"shasum":"e6179687c3e7c99404613664746bc4ef4a249ecb","tarball":"https://registry.npmjs.org/duplex/-/duplex-0.2.4.tgz","integrity":"sha512-KiAEHhwT0NCuLB8yjZ/rb02Q8zKHb83lC85CXieftYM98WZqS2icCN/gamB8Bw0UQv4PzNw9LQb2ckmjLDcVWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL6T9efwstOe+SWV993paXQLKanzj2Myl6I3dnKLJUCQIgd2dZ9YF6ppi7HilX1yks1MKq+wfGCy/zqF+pmKAA4mY="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}},"1.0.0":{"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"name":"duplex","description":"base class for a duplex stream","version":"1.0.0","homepage":"https://github.com/dominictarr/duplex","repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"scripts":{"test":"node test/index.js"},"readme":"# duplex\n\n<img src=https://secure.travis-ci.org/dominictarr/duplex.png?branch=master>\n\n\nSimple base class for [duplex](https://github.com/dominictarr/stream-spec#duplex) streams, that automatically handles pausing and buffering.\n\n``` js\n\nvar duplex = require('duplex')\n\nvar d = duplex()\n  .on('_data', function (data) {\n    d.sendData(data)\n  })\n  .on('_end', function () {\n    d.sendEnd()\n  })\n```\n\n## API\n\n### on('_data', function (data))\n\nEmitted when `write(data)` is called.\n\n### on('_end', function ())\n\nEmitted when `end()` is called\n\n### _data(data)\n\nAdd `data` to the output buffer. \n`'data'` will be emitted if the stream is not paused.\n\n### _end()\n\nCap the output buffer. no more data events may be added.\n`'end'` will be emitted after the buffer drains, \nor immediately, if the stream is unpaused.\n\n### pause()\n\nPause the readable side of the stream.  \nThis will prevent it from emitting 'data' or or 'end'\nuntil resume is called.\n\n### resume()\nUnpause the readable side of the stream.  \nThis will allow it to emit `'data'` and `'end'` events.  \nIf there there is any data in the output buffer,  \nIt will start draining immediately.  \n\n## _pause(), emit('pause')\n\nPause the writable side of the stream. this will cause write() to return false,\nso any streams piping into this stream will pause after thier next write.\n\n## emit('drain')\n\nUnpause the writable side of the stream. This will cause `Stream#pipe` to call `resume()`\non any streams piping to this stream.\n\n## Automatic Behaviours\n\n`destroy()` is called automatically after both sides of the stream have ended.\n`write()==false` after the stream emits `'pause'`,  \nand `write()==true` after the stream emits `'drain'`.\nThe user is responsible for emitting `'pause'` and `'drain'`.\n\n`resume()` will be called on `nextTick`, unless `pause()` was called manually.\nIf `resume()` is manually called before the `nextTick`, the stream will start emitting data\nimmediately.\n\n## License\n\nMIT / APACHE 2\n","_id":"duplex@1.0.0","dist":{"shasum":"6abc5c16ec17e4c578578727126700590d3a2dda","tarball":"https://registry.npmjs.org/duplex/-/duplex-1.0.0.tgz","integrity":"sha512-6Urdl3FU6TU6TAbd9b46YsvYhxqWvuuvlDL1VaP4DJb9E1jbU9Y5E6KUIXt7+0CUgKhPveZ495kqVAzm/uynyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5vEWbLEIoBeSR5BbSSTIMOpZq3a6maIxmNp9+YhgqEAiAjDEvJ1z/q9m+Y6J6hRppaC7DvqvizX8m7GcNukXucaQ=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{}}},"readme":"","maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"time":{"modified":"2022-06-30T11:57:29.180Z","created":"2012-07-25T14:04:44.851Z","0.0.1":"2012-07-25T14:04:46.876Z","0.1.0":"2012-07-25T19:14:02.958Z","0.1.1":"2012-08-11T13:01:17.955Z","0.1.2":"2012-08-14T12:21:26.639Z","0.1.3":"2012-09-11T14:45:14.617Z","0.1.4":"2012-09-11T18:30:25.536Z","0.2.0":"2012-09-26T15:10:10.081Z","0.2.1":"2012-09-26T16:43:19.417Z","0.2.2":"2012-10-11T13:55:18.282Z","0.2.4":"2012-10-21T15:28:00.139Z","1.0.0":"2012-11-13T05:43:43.926Z"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/duplex.git"},"users":{"fgribreau":true,"daviddias":true,"darelf":true}}