{"_id":"stream-splitter","_rev":"18-2a74dfd511db05032ef8b4a92928424a","name":"stream-splitter","description":"Split streaming binary data like a pro!","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.0":{"name":"stream-splitter","version":"0.1.0","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3","dropper":"0.0.7"},"_id":"stream-splitter@0.1.0","dist":{"shasum":"6b6079c57fb8e6ed1a4673795ad8e3539fe750b2","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.1.0.tgz","integrity":"sha512-kOUWgt+20ORlbK/BOH50IHkk9ysjrzYQUzN+7wPnXBm0IKkUkG3m9Gyscc9UU9fXaCIoSYgwTxdg9vk2cKbj8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXeibJ4WgGOeURQauuT2qjxQgr6iW+mfPIPB3URomkCAiAcR10wTUJU48SrR3DJGYZ+X7y1GySf0op79xajkyjkzQ=="}]},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}]},"0.2.0":{"name":"stream-splitter","version":"0.2.0","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3","dropper":"0.0.7"},"_id":"stream-splitter@0.2.0","dist":{"shasum":"bbb873d86e56e26f19353189e0d6c50ee6fbd766","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.2.0.tgz","integrity":"sha512-93zNo/bfOk5iY4sw7+AUYy5i16bru6AGGAfrOJvPxXHzu/2bS2bPFB0KlAayKaZy0FZAI40tNAMC1joB2CIhfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwOuVLiA5zz37n9uMfRpMecRbWs6KRrKE1Lg+ly0ydmAIgOAfjT8dgAd6/+30THoj7h6vsd1VNovOKUqGD5WRn1F0="}]},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}]},"0.2.1":{"name":"stream-splitter","version":"0.2.1","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3","dropper":"0.0.7"},"_id":"stream-splitter@0.2.1","dist":{"shasum":"08c88455892f5d8d185c8b737a036a3701e32196","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.2.1.tgz","integrity":"sha512-upH5uzDhebFJq/qlgFh+IF4pNx+aUjuRRSHw0NI19SKLK0MX32PvRj2hiCf/9JJsNafpM12xdJr0iCHo74UKpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe8sXE3CdHZZwnC/v5EDIok5KIT7efe6uzugOTigD18gIgatpbaT96AZhRy6b2B7Ir1q1z5WVeB4h8EVn+cwnT2Hw="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"samcday","email":"me@samcday.com.au"},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}]},"0.2.2":{"name":"stream-splitter","version":"0.2.2","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3","dropper":"0.0.7"},"_id":"stream-splitter@0.2.2","dist":{"shasum":"12236df11d611499b5e38d8e87b18b277b0b25dd","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.2.2.tgz","integrity":"sha512-FmPzObAccwmGGjt2lRpJoMOOqti9yOgjIUbS5miGb2sduUbI8X3DNa/DJLhHpiIbvkFblilZ64t6WVLzmlbsfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAIh96TxA9EsqC6A8LGwt4qWNdcUsL7rszxyFamx2c5QIhAKhjFaZmdajLzwLKKnkGyAm4qkKc/4gYVp1gT3bX4zHL"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"samcday","email":"me@samcday.com.au"},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}]},"0.3.0":{"name":"stream-splitter","version":"0.3.0","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3","dropper":"0.0.7"},"_id":"stream-splitter@0.3.0","dist":{"shasum":"56609ac02b86f1d758f11e495c3126349408a10a","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.3.0.tgz","integrity":"sha512-iXkzEi7cHVM1Pw8pJrAsnIv2bS4D6/7Z9WEmENrIZEfRlwHcjiQglfUND94m3O87G6MIho+YFcaRIjACO4gajQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICS83qSZbd0yN2oSMOEms/2at821NIa1rTT4Zr6ML5gKAiBpafMuMdnjU7+3q1Kwt9G5oAoBsWNZTL68xJRcYOaIyw=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"samcday","email":"me@samcday.com.au"},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}]},"0.3.2":{"name":"stream-splitter","version":"0.3.2","description":"Split streaming binary data like a pro!","main":"lib/splitter.js","scripts":{"prepublish":"cake build","test":"mocha"},"author":{"name":"Sam Day"},"license":"BSD","dependencies":{"buffers":"~0.1.1"},"devDependencies":{"coffee-script":"~1.3.3","mocha":"~1.2.2","should":"~0.6.3"},"repository":{"type":"git","url":"https://github.com/samcday/node-stream-splitter.git"},"homepage":"https://github.com/samcday/node-stream-splitter","bugs":{"url":"https://github.com/samcday/node-stream-splitter/issues"},"gitHead":"8ae9ff8d70ab71609ba1cce135055c3c04feb762","_id":"stream-splitter@0.3.2","_shasum":"e2f28262e53c2d8bbc492e72f2960fc19857984d","_from":".","_npmVersion":"2.1.11","_nodeVersion":"0.10.33","_npmUser":{"name":"samcday","email":"me@samcday.com.au"},"maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}],"dist":{"shasum":"e2f28262e53c2d8bbc492e72f2960fc19857984d","tarball":"https://registry.npmjs.org/stream-splitter/-/stream-splitter-0.3.2.tgz","integrity":"sha512-9VAHJIhskQFJMbyKbf/5flSXV2HsP9MDFdCp3A8WDBWkZ8tP/SOfkI2c5lEHNNUNzbWdNkJEv6iNvQRJnSbYuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQzvhHYMmPrb71dScGmeBqp3S45/yKy/DAWxjR8VaySwIgJ3bkAQNfSMdE6sP9mPQNcFmIPzfJBqVjyrScli0B/CE="}]}}},"readme":"# stream-splitter\n\n[![build status](https://secure.travis-ci.org/samcday/node-stream-splitter.png)](http://travis-ci.org/samcday/node-stream-splitter)\n\nSplit them streams, in style!\n\n```javascript\nvar fs = require(\"fs\");\nvar StreamSplitter = require(\"stream-splitter\");\n\nvar splitter = fs.createReadStream(\"afile.txt\").pipe(StreamSplitter(\"\\n\"));\n\n// Set encoding on the splitter Stream, so tokens come back as a String.\nsplitter.encoding = \"utf8\";\n\nsplitter.on(\"token\", function(token) {\n\tconsole.log(\"A line of input:\", token);\n});\n\nsplitter.on(\"done\", function() {\n\tconsole.log(\"And that's all folks!\");\n});\n\nsplitter.on(\"error\", function(err) {\n\t// Any errors that occur on a source stream will be emitted on the \n\t// splitter Stream, if the source stream is piped into the splitter \n\t// Stream, and if the source stream doesn't have any other error\n\t// handlers registered.\n\tconsole.error(\"Oh noes!\", err);\n});\n```\n\n## Installation\n\n`npm install stream-splitter`\n\n## API\n\n```javascript\nStreamSplitter = require(\"stream-splitter\")\n```\n\n`StreamSplitter` accepts a single argument, and returns a `WritableStream`:\n\n```javascript\n\taWritableStream = StreamSplitter(token);\n```\n\n## Usage\n\nSee the example above. Some notes:\n\n* The WritableStream returned will sense if you pipe a stream into it, and will \nregister an error handler on the source stream. If an error occurs on the source\nstream and you don't have any other handlers registered, the returned \nWritableStream will emit the source stream `error` for you. This enables you to\nchain a newly created ReadableStream straight into a StreamSplitter.\n* The emitted tokens will be `Buffer`s unless you set the splitter Stream \n`encoding` field.\n* This lib is designed to be as efficient as possible, making use of \nsubstack/node-buffers library to avoid unnecessary `Buffer` allocations/copies.\n\n## Tests\n\nCheckout the repository and run\n\n`npm install && npm test`\n\n## (Un)License\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org/>\n","maintainers":[{"name":"samcday","email":"sam.c.day@gmail.com"}],"time":{"modified":"2022-06-27T00:49:54.953Z","created":"2012-07-05T10:58:30.813Z","0.1.0":"2012-07-05T10:58:34.787Z","0.2.0":"2012-07-07T01:33:10.727Z","0.2.1":"2013-07-11T00:10:42.011Z","0.2.2":"2013-07-11T00:57:00.818Z","0.3.0":"2013-07-11T01:37:37.530Z","0.3.1":"2015-02-24T11:23:46.475Z","0.3.2":"2015-02-25T04:35:40.792Z"},"author":{"name":"Sam Day"},"license":"BSD","readmeFilename":"README.md","homepage":"https://github.com/samcday/node-stream-splitter","repository":{"type":"git","url":"https://github.com/samcday/node-stream-splitter.git"},"bugs":{"url":"https://github.com/samcday/node-stream-splitter/issues"}}