{"dist":{"shasum":"93109648787eb1218818065278d52e4eade92053","tarball":"https://registry.npmjs.org/flower/-/flower-0.2.1.tgz","integrity":"sha512-VvF5schl/cmj5q/ZyOYKU3ZZIHZwRECRXWx3k+tYERHcVUVa2nIQ3QC70SHBFBFAYvAR5j33BkS/ZgFQnthwMA==","signatures":[{"sig":"MEUCIGzfunmKBYn+hoOB1aUTRinvZTdVjWTD/BQI2ISV2I6xAiEAkiEqdQ/8ymTO5CUjKsZLXHb8LKDvK555NvAXgdL25TI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./flower.js","name":"flower","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"readme":"#flowers\n\n**flowers is a collection of stream helpers.**\n\n## Installation\n\n```sheel\nnpm install flowers\n```\n\n##API documentation\n\n### flowers.relayReadStream()\n\n_Also available as javascript constructor at `flowers.RelayReadStream()`_\n\nWill return a `ReadStream` object there does except for relaying pipe output.\n\nThe main usercase is that you expose function there don't have a callback\nbut returns a stream. However you have to do an async operation before\ncreateing the readstream, so you can't return the stream object directly.\n\n```JavaScript\nexports.read = function () {\n  var relay = flowers.relayReadStream();\n\n  process.nextTick(function () {\n    fs.createReadStream('file.txt').pipe(relay);\n  });\n\n  return relay;\n};\n```\n\n### flowers.buffer2stream(buffer, [options])\n\n_Also available as javascript constructor at `flowers.Buffer2stream()`_\n\nTakes a buffer or string and splits it up intro chunks there is emitted in\na `ReadStream` object.\n\nThe `options` object takes a `chunkSize` property there tell how big each chunk\nshould be in bytes. By default this is `64 * 1024`.\n\n```JavaScript\nvar stream = flowers.buffer2stream(buffer);\n\nstream.pipe(fs.createWriteStream('file.txt'));\n};\n```\n\n### flowers.stream2buffer(stream, callback)\n\nTakes a `ReadStream` and buffer it up until the stream is closed or an error occurred.\nThe buffer is then send as a callback argument.\n\nThe `callback` have two arguments `error` and `buffer`.\n\nThe `options` object takes a `chunkSize` property there tell how big each chunk\nshould be in bytes. By default this is `64 * 1024`.\n\n```JavaScript\nvar stream = fs.createReadStream('file.txt');\n\nflowers.stream2buffer(stream, function (error, buffer) {\n\n});\n```\n\n##License\n\n**The software is license under \"MIT\"**\n\n> Copyright (c) 2012 Andreas Madsen\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","engines":{"npm":"1","node":"0.6 || 0.7 || 0.8"},"license":"MIT","scripts":{"test":"vows test/simple/* --spec --isolate"},"_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"keywords":["stream","buffer","pipe","convert"],"repository":{"url":"git://github.com/AndreasMadsen/flower.git","type":"git"},"_npmVersion":"1.1.21","description":"Collection of stream classes and functions","maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"_nodeVersion":"v0.6.19-pre","dependencies":{},"_defaultsLoaded":true,"devDependencies":{"vows":"0.6.x","wrench":"1.3.x"},"_engineSupported":true,"optionalDependencies":{},"_id":"flower@0.2.1","version":"0.2.1"}