{"_id":"memorystream","_rev":"30-7dd02e992a2ccffe39896b97c761efaf","name":"memorystream","description":"This is lightweight memory stream module for node.js.","dist-tags":{"latest":"0.3.1"},"versions":{"0.0.1":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.0.1","keywords":["memory","stream"],"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"engines":{"node":">= 0.1.98"},"_id":"memorystream@0.0.1","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.1","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"48a401d1e9f212e0c3aadd5116ee0de5bf3e53e1","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.0.1.tgz","integrity":"sha512-NzUgoK0W7ZvHwPXoV1ldA/l1y+9ivzCTHExHD26Hp3HRuIEtKj08EZlRmFMt9DshvL2KQ5064x+BvkAp+EbRPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUSM3Bes7CNcwBR7hVh0thu0yWd0wsK2eyhXnmU5sM3AiA19aAcFP7ZT4K1QObB0c1SIxXt8+zbnUoivkOlvYNXEg=="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.0.2":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.0.2","keywords":["memory","stream"],"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"engines":{"node":">= 0.1.98"},"_id":"memorystream@0.0.2","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.1","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"86486fdb7075225e02b1a3bf9214e2d387b35136","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.0.2.tgz","integrity":"sha512-wRl7u81zqF29oAMmlEwW8KX48yvgAZdmKj6VvcuVp+RdjX6eQHvwdd/O9bS4U/0dTIFEewOPqOokI/kab+lmdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8IQTCLWED3uK76etI3Ch43fq3Dj4rQkcyR6IMC3YSRAiB4kWoHOj24g04l6W0ufNiarP450u9vDSIKF/jYgsh+Eg=="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.0.3":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.0.3","keywords":["memory","stream"],"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.1.98"},"_id":"memorystream@0.0.3","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.1","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ab345e11ca3fa9ea623ca0a996b8a7668fe9fe43","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.0.3.tgz","integrity":"sha512-pJrzhWYkGjvDHbmYSudRBP++lnwbkXZAmUr7wOFOnKuYIfgnXEN/u5ddZegFMWb0WZY97VCWpEpQpNUFCO/9SA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXtM1OtdorRzzFguBNOOaEiaf2Gf+O6ugaIjJWTsTXkAiEAzHq2uXJ98iMcQEmO0O4ZSnxaEeGLgACEqDVjJBvcyg8="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.0.4":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.0.4","keywords":["memory","stream"],"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.1.98"},"_id":"memorystream@0.0.4","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.5.5","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"24c29389d908bdcaa669a5d4b80a563f4a8c52c1","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.0.4.tgz","integrity":"sha512-OIaMPfH3VQL69gpeYU7Gu3FOkbaFrc1lsxhi79GLLBE48E6kVDC4EuHL8M1sn2we4PSHHOjUUi7b0Pkrp57/wQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY9qmkUbSiJh2aTDqm9zbDbz/DUrBu42CeN+PhWPh6tAIgON4wHV1ecwcKdXvGENP8ULCaBVpI/+pXwNA5cly8/5A="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.0.5":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.0.5","keywords":["memory","stream","tools","streams"],"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.3.0"},"_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"_id":"memorystream@0.0.5","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"9f7dfc233c615c8ed17f03cc7b65958a95956dc0","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.0.5.tgz","integrity":"sha512-ApvbwKNxYMFVbEDjwaNDrsoa+infKutjLxjXsxGKSiD2mth8AVMCyK37y1KLYy6hxUdbrYUSwteyaeJ9fGNtlQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsPzWyrRrmUWw/fxGtrGCX/X+Storf8wp6GJLzRIk3awIgZtPKsgX23PR8dUeaTuAXgrXAXY1A3MIpYGE5g7OBmcA="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.1.0":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.1.0","keywords":["memory","test","stream","tools","streams"],"devDependencies":{"expresso":">=0.7.x","jslint":"*"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.3.0"},"licenses":[{"type":"MIT","url":"http://github.com/JSBizon/node-memorystream/raw/master/LICENSE"}],"_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"_id":"memorystream@0.1.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"5c57558fa66d8d853d9e92fffc72f91d8a6c364e","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.1.0.tgz","integrity":"sha512-W2qImp4iQ9/0LltMBesd8RNAyhOVHqF6wC/h5LXHndMbzaNEKokiiBq2n59fWgvgkEtEGBBYlvU/76MgiFbTgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBO08OZdWW4NsUXEUCVaWC6ANIHP7JhSfvvIKi1iCBqjAiEAq1ODNt07v9sUmGHn2C3lxPEsi7mDD9Z/kRV3Pt+oz9U="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.1.1":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.1.1","keywords":["memory","test","stream","tools","streams"],"devDependencies":{"expresso":">=0.7.x","jslint":"*"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.3.0"},"licenses":[{"type":"MIT","url":"http://github.com/JSBizon/node-memorystream/raw/master/LICENSE"}],"_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"_id":"memorystream@0.1.1","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"6ca9a0bd0ca848e71be087e9af08a94cd1b9e961","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.1.1.tgz","integrity":"sha512-jfpm1xFzHSRy11XRC8QV8Z9oS9Ng0SpsRe5kF67AAhba6gtPtN5XdRnQc6u7b4gkdEOxKcQ+BrI+ULV9WB3lYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/atkoXb2ltBcStbu/SjFnTdVKJToHjM1FYRuvxD1pqAiEA7eT64EEjcTvEEBKRErAe+jM24YyX62T4bdaHeVYxSEM="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.2.0":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.2.0","keywords":["memory","test","stream","tools","streams"],"devDependencies":{"expresso":">=0.7.x","jslint":"*"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"git://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.3.0"},"licenses":[{"type":"MIT","url":"http://github.com/JSBizon/node-memorystream/raw/master/LICENSE"}],"_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"_id":"memorystream@0.2.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.2","_defaultsLoaded":true,"dist":{"shasum":"30eb02e87898812d9ad4d4dce82ffd3768e51a2c","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.2.0.tgz","integrity":"sha512-cOJ91oOtLxeYYO3KjvY4GLZ0HL6GlvIpzIn7Iok00Q1oIbrIfHbWn9svudK4jJ8gjqy6WoEWmm9GU/Wzo1lUaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLC20/HjJCrhpX2/Wk228Iojfu2CHVQ3qbeFyf9ZGohAIgT8S6bnEyGryRX2Ap4clxo0sDLaEtsCZLIENw8bFtA5Y="}]},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.3.0":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.3.0","keywords":["memory","test","stream","tools","streams","buffer"],"scripts":{"test":"grunt"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.20.0","grunt":"~0.4","grunt-cli":"~0.1.13","grunt-mocha-test":"~0.12.2","grunt-contrib-jshint":"~0.10.0","q":"~1.0.1"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"https://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/JSBizon/node-memorystream/raw/master/LICENSE"}],"bugs":{"url":"https://github.com/JSBizon/node-memorystream/issues"},"_id":"memorystream@0.3.0","dist":{"shasum":"e817fe6aca28fc888b147afbd40213f10b0a8f9b","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.3.0.tgz","integrity":"sha512-5mX9xLJ3ye3dHbs0LXmjx30D8vNttyXtdvgpwbr4tLSVdgLOlO+l0W/PxISzBZa+EiS9GniznWaP7lpexPKPZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF2WtMlH2YnY6YdGd6OvwLlsxCyCJH3LAzvdLRHuXLKIAiBe2EJx5eMsEJWWJNrISaQUTo2VZHZ1Saf4liVw836Lcw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}]},"0.3.1":{"name":"memorystream","description":"This is lightweight memory stream module for node.js.","version":"0.3.1","keywords":["memory","test","stream","tools","streams","buffer"],"scripts":{"test":"grunt"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.20.0","grunt":"~0.4","grunt-cli":"~0.1.13","grunt-mocha-test":"~0.12.2","grunt-contrib-jshint":"~0.10.0","q":"~1.0.1"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"repository":{"type":"git","url":"https://github.com/JSBizon/node-memorystream.git"},"homepage":"https://github.com/JSBizon/node-memorystream","engines":{"node":">= 0.10.0"},"licenses":[{"type":"MIT","url":"http://github.com/JSBizon/node-memorystream/raw/master/LICENSE"}],"gitHead":"5a7ae4a621f786cdb31ef444839ef6a92af5300f","bugs":{"url":"https://github.com/JSBizon/node-memorystream/issues"},"_id":"memorystream@0.3.1","_shasum":"86d7090b30ce455d63fbae12dda51a47ddcaf9b2","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jsbizon","email":"dmitryp3@gmail.com"},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}],"dist":{"shasum":"86d7090b30ce455d63fbae12dda51a47ddcaf9b2","tarball":"https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz","integrity":"sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHA1T1nUtTwDpLxsG1X0p9o2tahx1XZMz0Q/1sgZrwyOAiBRTgYgjixYbP1hj/ZlvKR3TtwYDi2Vh581FozREEckvw=="}]}}},"maintainers":[{"name":"jsbizon","email":"dmitryp3@gmail.com"}],"time":{"modified":"2022-06-19T17:47:05.910Z","created":"2011-08-27T15:04:10.004Z","0.0.1":"2011-08-27T15:04:10.594Z","0.0.2":"2011-08-27T15:07:20.778Z","0.0.3":"2011-08-27T16:57:23.801Z","0.0.4":"2011-09-01T11:55:07.305Z","0.0.5":"2011-12-12T08:53:25.645Z","0.1.0":"2012-02-07T16:47:27.580Z","0.1.1":"2012-05-15T12:24:21.657Z","0.2.0":"2012-06-26T07:22:40.786Z","0.3.0":"2014-12-29T21:19:01.803Z","0.3.1":"2015-03-04T22:29:35.936Z"},"repository":{"type":"git","url":"https://github.com/JSBizon/node-memorystream.git"},"author":{"name":"Dmitry Nizovtsev","url":"https://github.com/JSBizon"},"readme":"[![Build Status](https://travis-ci.org/JSBizon/node-memorystream.svg?branch=master)](https://travis-ci.org/JSBizon/node-memorystream)\n\n# Introduction\nnode-memorystream - this module allow create streams in memory. It can be used for emulating file streams, filtering/mutating data between one stream and another, buffering incoming data, being the gap between two data/network streams of variable rates, etc. MemoryStream support read/write states or only read state or only write state. The API is meant to follow node's Stream implementation.\nModule supports streams for node > 0.10 now.\n\n\nOriginal module is here git://github.com/ollym/memstream.git was remade and improved. \n\n## Installation\nIf you have npm installed, you can simply type:\n\n\tnpm install memorystream\n\t\nOr you can clone this repository using the git command:\n\n\tgit clone git://github.com/JSBizon/node-memorystream.git\n\t\n## Usage\nSome examples how to use memorystream module.\n\n#### Basic I/O Operation\nIn this example I illustrate the basic I/O operations of the memory stream.\n\n\tvar MemoryStream = require('memorystream');\n\tvar memStream = new MemoryStream(['Hello',' ']);\n\t\n\tvar data = '';\n\tmemStream.on('data', function(chunk) {\n\t\tdata += chunk.toString();\n\t});\n\t\n\tmemStream.write('World');\n\t\n\tmemStream.on('end', function() {\n\t\t// outputs 'Hello World!'\n\t\tconsole.log(data);\n\t});\n\tmemStream.end('!');\n\t\n#### Piping\nIn this example I'm piping all data from the memory stream to the process's stdout stream.\n\n\tvar MemoryStream = require('memorystream');\n\tvar memStream = new MemoryStream();\n\tmemStream.pipe(process.stdout, { end: false });\n\t\n\tmemStream.write('Hello World!');\n\t\nIn this example I'm piping all data from the response stream to the memory stream.\n\n\tvar http = require('http'),\n\t\tMemoryStream = require('memorystream');\n\n\tvar options = {\n\t\thost: 'google.com'\n\t};\n\tvar memStream = new MemoryStream(null, {\n\t\treadable : false\n\t});\n\n\tvar req = http.get(options, function(res) {\n\t\tres.pipe(memStream);\n\t\tres.on('end', function() {\n\t\t\tconsole.log(memStream.toString());\n\t\t});\n\t});\n\n#### Delayed Response\nIn the example below, we first pause the stream before writing the data to it. The stream is then resumed after 1 second, and the data is written to the console.\n\n\tvar MemoryStream = require('memorystream');\n\n\tvar memStream = new MemoryStream('Hello');\n\tvar data = '';\n\tmemStream.on('data', function(chunk) {\n\t\tdata += chunk;\n\t});\n\t\n\tmemStream.pause();\n\tmemStream.write('World!');\n\t\n\tsetTimeout(function() {\n\t\tmemStream.resume();\n\t}, 1000);\n\n## Documentation\nThe memory stream adopts all the same methods and events as node's Stream implementation.\nDocumentation is [available here](http://github.com/JSBizon/node-memorystream/wiki/API/ \"Documentation\").\n\n\n\n\t","homepage":"https://github.com/JSBizon/node-memorystream","keywords":["memory","test","stream","tools","streams","buffer"],"contributors":[{"name":"Dmitry Nizovtsev","email":"dmitryp3@gmail.com"}],"readmeFilename":"README.md","bugs":{"url":"https://github.com/JSBizon/node-memorystream/issues"},"users":{"rmarques":true,"joelwallis":true,"rochejul":true,"floriannagel":true,"dongdao_huangyipeng":true}}