{"_id":"stream-stack","_rev":"30-0bc2ad2b3d966e8e2e21142ef17d875c","name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","dist-tags":{"latest":"1.1.4"},"versions":{"0.0.1":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"0.0.1","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"main":"./stream-stack","engines":{"node":">= 0.3.0"},"_id":"stream-stack@0.0.1","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-0.0.1.tgz","shasum":"24d6e343eed792759e5870a94a2ba30346aa7d66","integrity":"sha512-KBWDq4Vvgq430Bs7XtktnpLZ1pTGRQA+j8FJxiVL3Y3BW2xiSjdwQhdP5+Dlda6fRZVp7wkUbeCdQe0n8RgiXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcyIaHes2Yj4HkqvNNKOmpAf0/0QAKy9mU5p00ETOG3gIhAJeiOGjRUX7u4tdT1Jx2+raSWZn1Ve6O/OmF7Uze/3qg"}]}},"0.0.2":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"0.0.2","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"main":"./stream-stack","engines":{"node":">= 0.3.0"},"_id":"stream-stack@0.0.2","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-0.0.2.tgz","shasum":"bbb3cbced607cf8bec901ebb91715faff5db7b11","integrity":"sha512-Ws7jw43Oml3f06B/UMNcZROsCtCTdAOC02jcx/GYl2W0qAfVQl7FHcGQeWv3caiaVnSZ2ERQZ3drKEylZxhtqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7p6MWW+z3BPAl3LsDjJGKzW6dwQjfXGTRN0CWsKE6mQIgIEeuKfORO2hhX2iyk3EnHHHsDYD/nsKqqGCZGfZaksU="}]}},"0.1.0":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"0.1.0","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"main":"./stream-stack","engines":{"node":">= 0.3.0"},"_id":"stream-stack@0.1.0","_nodeSupported":true,"_npmVersion":"0.2.8","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-0.1.0.tgz","shasum":"00215a163a96a26b0de2911f4e6087dc3d6feb19","integrity":"sha512-nTsvX6QJ7m7YiCGJajj8htHE3DHO9C0T2mrH/b5roOGnOuxxmD0C8Ox1Sh9cMgeOhmgicnvMKEOqfABdzWgkUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNKPTtqX6ZbBb05v2eGABudEdGDlZayeR6jLs8nvnuGQIgTGXlvzsWCQ8PyN3wv16ay02FJFUFkj4PPkehGog9SP0="}]}},"1.0.0":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.0.0","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"_id":"stream-stack@1.0.0","_nodeSupported":true,"_npmVersion":"0.2.10-1","_nodeVersion":"v0.3.2-pre","dist":{"shasum":"7de9254e4eaa3fa846e4bbfcf928446b2faededb","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.0.0.tgz","integrity":"sha512-qUS+HpwqlstcoZ5XEijGkXxMeB3SKbYWYcFGvS6P8XNOu9jCNequy0DpR3xaZi8M06iF5Le9yoozC06BYC1Jnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICI4j7SJOyreVhe05k+JaXh0aYdmHjxyj9lp7MCXQq6xAiA3M7nj4n4TaM/qtdx5msJjRLp+THgnzwHYS9j5XN1Q3w=="}]}},"1.0.1":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.0.1","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"_id":"stream-stack@1.0.1","_nodeSupported":true,"_npmVersion":"0.2.10-1","_nodeVersion":"v0.3.2-pre","dist":{"shasum":"5faa59f620f2deb2dc108ef9e79781ab5a3f3b5a","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.0.1.tgz","integrity":"sha512-Qolg00YU7g3BavsPDTIOXTP8/Ap3+R8LZ1ftfs7Ibno6IaLwtq0tcejzZHrkkFphlJivVlwWNt5WBc2CRAK7lg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUHGUk8EbwT/3m106RQnvRO38L+VRUBRaI1/Tt5PTxsAiEAlGQedkyg3W3JEQlWTcbStc7wPEmYzya42IQguszRZLU="}]}},"1.1.0":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.1.0","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","modules":{"util":"./util"},"scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"_id":"stream-stack@1.1.0","_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.3.2-pre","dist":{"shasum":"150961ccbc5df573576a2b66d05a8c6423a825de","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.0.tgz","integrity":"sha512-IWfgp1OIvuB+59lGpfwwdLhKmnotrv+c7DoXqO7jA5UNYFRgpx7s+VnNrb6aqYJCbGrjxhoXDOSUSq/O39hIYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5R/swK1B6mBnT1CqLkV5z6j2EdPeFq25VuhVOrRTn7AiBFtsiJOyMNtC5fAJ1Oq3EOOgeroaGjXyqP2vVj4Hy6Dg=="}]}},"1.1.1":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.1.1","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"directories":{},"files":[""],"_id":"stream-stack@1.1.1","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.3.8-pre","_defaultsLoaded":true,"dist":{"shasum":"d5a4e0ce1c94b76d927b532933900503b542928b","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.1.tgz","integrity":"sha512-FnzmaugReGYP0huMGj7w38uI/3QlxWD73VVIfuNFv7olb+8a1AAPwOzUf06cTzXBf2yGf8aQA82TWXK1ZzQ01A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvc70b+w+U4YmddtRG/ED0kIqd1Iv1NJBABiVrf5crsgIhAP6EM7z/11hHvKhEkEwq2PX4acnfpGXtQuYNAhk232Gu"}]}},"1.1.2":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.1.2","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"directories":{},"files":[""],"dependencies":{},"_id":"stream-stack@1.1.2","_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"dfe3f9cde878c7f34dc813ba9642b178e0c7a235","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.2.tgz","integrity":"sha512-jOkDo9wAaroykz5+XUdsdwQ1AgcYgYkrIs8LhqJLXCVB+m3jwk80nZxbYzVUXxGBMoLFI/ynLdqW/3z0oZEMFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeByBWfW0JUVNbXk2lF145b9Tk/OWPcrllJKsyTi0FmQIhAPKQitzqv5wij11/y78HQSjDS0i+H7zVoGQqYuf2Veix"}]}},"1.1.3":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.1.3","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"directories":{},"dependencies":{},"_id":"stream-stack@1.1.3","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"20e53ece20b2a20e7ba6b08790f3b63dc6fa48e7","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.3.tgz","integrity":"sha512-5bTeEz8Knfx2w14CFq4H4GCIUVP5K0duTpWrRdsGFBM6eMqoVlvJi9y335/y+qW7/kXKlSghIm1aX8SRKDlYhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwccovBl7W9FPO54vRMxTpo2IaUMss/VtXG5NjCZggSQIhAMUUiWxhD7H3BgtfE0ZdAjZLfUpuJiBm95eQSwqb7SzW"}]}},"1.1.4":{"name":"stream-stack","description":"Filter low-level `Stream` instances into stackable, protocol-based streams.","version":"1.1.4","author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"keywords":["stream","stack","protocol","filter"],"devDependencies":{"expresso":"*"},"main":"./stream-stack","scripts":{"test":"expresso"},"engines":{"node":">= 0.3.0"},"directories":{},"dependencies":{},"_npmUser":{"name":"TooTallNate","email":"nathan@tootallnate.net"},"_id":"stream-stack@1.1.4","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.7.8","_defaultsLoaded":true,"dist":{"shasum":"70846042bab0185008e509edfe1f77f9361cba69","tarball":"https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.4.tgz","integrity":"sha512-bmRYXVkxuyuiK3kvf54hgfLpv2TGlNzXE9S/DCPV82HqhcDonPFuRBWpeQUCpnRrprVCqXwrxVTq9WDwrrsLTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVpwAAml+iRLTWl3mPlDg5VrO73iw52420lNw4lfD+tAIgIzH5fuOD6SQAAMtJq1K+dhCINv0zteTHxjDuJVbZToA="}]},"maintainers":[{"name":"TooTallNate","email":"nathan@tootallnate.net"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]}},"maintainers":[{"email":"nathan@tootallnate.net","name":"tootallnate"}],"author":{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"time":{"modified":"2022-06-27T00:49:59.967Z","created":"2011-01-02T21:04:07.872Z","0.0.1":"2011-01-02T21:04:07.872Z","0.0.2":"2011-01-02T21:04:07.872Z","0.1.0":"2011-01-02T21:04:07.872Z","1.0.0":"2011-01-02T21:04:07.872Z","1.0.1":"2011-01-02T21:04:07.872Z","1.1.0":"2011-01-02T21:04:07.872Z","1.1.1":"2011-02-04T18:20:53.567Z","1.1.2":"2011-05-10T19:02:33.521Z","1.1.3":"2011-06-25T07:27:58.221Z","1.1.4":"2012-05-04T16:16:43.761Z"},"readme":"node-stream-stack\n=================\n### Filter low-level `Stream` instances into stackable, protocol-based streams.\n\nThis module exposes the `StreamStack` interface, which starts off as a node\n`Stream` subclass that accepts a \"parent\" Stream to work with. `StreamStack` is\nmeant to be subclassed in order to implement the layers of a protocol, or run the\nparent Stream's data through some kind of filter (i.e. compression).\n\nBy default, a `StreamStack` instance proxies all events downstream (from the\nparent stream to the child stream), and proxies all functions calls upstream\n(from the child stream to the parent stream).\n\nKeeping the `StreamStack` subclass' implementation independent of the parent\n`Stream` instance allows for the backend transport to be easily swapped out\nfor flexibility and code re-use. For example, storing `netcat` results to a file,\nand using `fs.ReadStream` as your parent stream, rather than `net.Stream`, in your\ntest cases.\n\nSince `StreamStack` inherits from the regular node `Stream`, all it's prototypal\ngoodies can be used along with your subclass instances. This makes it extremely\neasy for you to call `Stream#pipe(writable)`, in order to utilize node's data\ntransfer philosophies.\n\n\nA Simple Example\n----------------\n\nHere's a simple, kinda silly example:\n\n``` js\nvar util = require('util');\nvar StreamStack = require('stream-stack').StreamStack;\n\n// The first argument is the parent stream\nfunction DoubleWrite(stream) {\n  StreamStack.call(this, stream);\n}\nutil.inherits(DoubleWrite, StreamStack);\n\n// Overwrite the default `write()` function to call\n// write() on the parent stream twice!\nDoubleWrite.prototype.write = function(data) {\n  this.stream.write(data);\n  this.stream.write(data);\n}\n\n\n// How to Use:\nvar doubleStdout = new DoubleWrite(process.stdout);\ndoubleStdout.write(\"this will be printed twice!\\n\");\n```\n\nWe've defined a `DoubleWrite` class. It accepts a writable stream, and\nwhenever `write()` is called on the DoubleWrite instance, then in return\n`write()` get called _twice_ on the parent stream. In this example, our\nwritable stream, `process.stdout`, will get the string printed to it twice.\n\n\nKnown Subclasses\n----------------\n\nCheck out the [Wiki][] page to see the list of [Known Subclasses][Wiki].\n\n[Wiki]: https://github.com/TooTallNate/node-stream-stack/wiki\n","readmeFilename":"","keywords":["stream","stack","protocol","filter"]}