{"_id":"linestream","_rev":"39-878234b5e76fee9902513f97482d2b54","name":"linestream","description":"a readable stream emitting lines (from files, streams)","dist-tags":{"latest":"0.3.2"},"versions":{"0.0.2":{"name":"linestream","version":"0.0.2","description":"A simple EventEmitter which emits read-line events.","tags":["EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"https://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream","_id":"linestream@0.0.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10-1","_nodeVersion":"v0.4.5","dist":{"shasum":"68616841140440593e6de7a42b2357f3aba37e9e","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.0.2.tgz","integrity":"sha512-BCmna1WmQNI6FKwAKY7rlTQjeY8voIuUt3fJQu99P9zvfHCwbOdX8fwMksS4y1EbiqVRFJLpiYkkQvypFa2NnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAcmnMXQMZdiKEmyEi7ilVgLicS2WzNsYXM8uZpvcXGnAiASUV5LZotFyg9KpW00xPYncQPpwStqi5e2YeqWrWyB6Q=="}]},"directories":{}},"0.1.0":{"name":"linestream","version":"0.1.0","description":"A simple EventEmitter which emits read-line events.","tags":["EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"https://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream","_id":"linestream@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10-1","_nodeVersion":"v0.4.5","dist":{"shasum":"5a60916f80213acbf264432beace93d7d0939ee5","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.1.0.tgz","integrity":"sha512-Cm8gRhSNntwiXpp/kdwtCHZTVsJJ+XntpZ2JMa83EiGAwesnGhc8XjdSxW6QSkGVVFYBAIk759J7lZXXCs/1Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBl1Y4hSDUr/ebumIRW5Xa32VS+ZhFPi3bZlnvyln2/ZAiEAwIKk43S/mzEgK0EWVzajVmCyvaBtPArDbGWtBtt1BBU="}]},"directories":{}},"0.2.1":{"name":"linestream","version":"0.2.1","description":"A simple EventEmitter which emits read-line events.","tags":["EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmJsonOpts":{"file":"/home/shinout/.npm/linestream/0.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"linestream@0.2.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.5.3","_defaultsLoaded":true,"dist":{"shasum":"fe075aa10baafaf453d07e752e605190c3a25f64","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.1.tgz","integrity":"sha512-pDCmfhLtOUeKKGpWmJKcGl0nuL80e9+TXG5n6N1wH9d1BGRGVc0NzKTqKE/5RiykSNLWt0fZdQRxk0PDY7K+kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVN+ZaxtfcIUCDOHtGGvOoDoHyZ/iVo/4vLx7IHPx8ogIhAJ5F+6ZEnzCjMQaT7slJRkGTUWUqr4eyxQkgzI9xbd9O"}]},"scripts":{},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"directories":{}},"0.2.2":{"name":"linestream","version":"0.2.2","description":"A simple EventEmitter which emits read-line events.","tags":["EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.2","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.5.10","_defaultsLoaded":true,"dist":{"shasum":"0ef8ef5198eea970d644c0c36205a8555481e610","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.2.tgz","integrity":"sha512-C/r9uDMiX5dkv35MAfW+LPaJko1xlDeuLahh18UukQIemUJixmBSCYrJGccvIeyakHIAD4OuntwgoJ+QRq0jEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6lv9SynD9IAH6fnCwmtTaYY2jELXIeWHE/SiaI8g8PAIgVQJ1mAzmC3+oCOT0XjP0fS34Wsry/WotgF4rH7DVW7Q="}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"directories":{}},"0.2.4":{"name":"linestream","version":"0.2.4","description":"A readable stream emitting lines from a file or a stream.","tags":["EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.5.9","_defaultsLoaded":true,"dist":{"shasum":"5543a2548a56907714b47a4fb92ab39c2da92683","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.4.tgz","integrity":"sha512-LJCuhoT9zjjx4YatUqval6u7EnoFvkNzYO1LKtExg0aVgidKrw3Z057fzrgUSRLeZM7K7s3Qm2xSiZPT+ZLb4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDHnNbtrE/KJeo+UoUgyS+Xb44btof0aqvnd65DWGerqAiAB12TxFY9TUyUt+G59IgOCsDBHEURIlZWV6jnowtUGig=="}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"directories":{}},"0.2.5":{"name":"linestream","version":"0.2.5","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.5","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.103","_nodeVersion":"v0.5.9","_defaultsLoaded":true,"dist":{"shasum":"10fb1998bcdb13ca8dc8f68278a496366d2bedab","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.5.tgz","integrity":"sha512-MlGltHJ8OJwTXGLqY4mgapY00Ly8hOKxaT1IdzU36FKcwj1u4M4Flz/4opQgpX7MBOhbe0i+lLQCtGSO8Yj82g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9KUAz/eWBBaYeKPGkSIUU3Fyme72auwzOs5hMRtQ7cwIhAMe2Bb/ycLaans90M8PLZq+6xlqQJL6f3Xr7SHEEa1ab"}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"directories":{}},"0.2.6":{"name":"linestream","version":"0.2.6","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.6","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"af4798b2092dd225733e321cda38d1ef731f1dd2","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.6.tgz","integrity":"sha512-Qo4VZjKI6Mod/S4EH2ypY4EStqaBu3jX7Ff/gYtNzElDzR9H8jxQxBWwMOFJrI4vvTml7ibtXPaObgVbiKeTJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdEtpBU3u6Dds1EK3kuD6TeR6mNm9Nu/SyPIdlO+4IIAiApLa1/q6NZc7J4HlbfW1CYeeYLpWFBOsrHoTV9WluVPA=="}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"directories":{}},"0.2.7":{"name":"linestream","version":"0.2.7","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.7","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"e8bd0104b419040a87eceb02cae1e96d2c7ff764","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.7.tgz","integrity":"sha512-h4KDKaffmTbQbSO0gnb0VS0RWsnxbcD4kRK5ZGVQaAGeZ1QHgmpQxQyeOgkfoufhmxEHC6LHO4uQ/wB+ioZMQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgD29fWqU7LpJZ1Wfh2kFsm4SbHHBdTTQxql3SnjWDHAIgU/LyHE2czBikaUK9+tydZ36cuJM1uFPCx8qUmbF67jQ="}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}]},"0.2.8":{"name":"linestream","version":"0.2.8","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.8","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"81989c600222f5baf8519ca7a0b11eb0e2b157aa","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.8.tgz","integrity":"sha512-4YGqHL7CDC6p7p3PPipdihxew8fYlKV/0e4xWUiFJWL8FUC6rR2sPhICW17jV0NI/M1VfmRg+g7OYJC/P4YdqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICCYXAW8XtOnTp+7Y1fWWVAPIq+W7yqCZW8MEel0wmQsAiEA+PQNRUIsLIuGNmol16kkIqZc6Rmn3121byJrgvH688I="}]},"readme":"LineStream.js 0.2.8\n==========\n[Node.js] EventEmitter which emits read-line events\n\nChange Log\n\n----------------\n* [0.0.1]: Release\n* [0.0.2]: Registered to npm\n* [0.1.0]: Implemented the interface of ReadableStream\n* [0.2.0]: Implemented resume()\n* [0.2.1]: Implemented pause()\n* [0.2.2]: the default value of options.trim be true\n* [0.2.3]: setEncoding('utf8') to given streams\n* [0.2.4]: if option.trim, the value after the last \\n is not emitted.\n* [0.2.5]: implemented filter function with fieldSep, fieldNum, empty, comment and filter()\n* [0.2.8]: LineStream.create() : for simple use\n\nOverview\n----------------\n### What's this? ###\n    A simple EventEmitter which emits read-line events\n    \n    var stream = new LineStream(__filename);\n    stream.on('data', function(line){\n      console.log(line);\n    });\n\n\n### Installation ###\n    git clone git://github.com/shinout/LineStream.git\n\n    OR\n\n    npm install linestream\n\n### Usage ###\n#### with file ####\n    var LineStream = require('/path/to/LineStream');\n    var stream = new LineStream(filename, {bufferSize: 300});\n\n    stream.on('data', function(line, isEnd) {\n      console.log(line); // each line comes here\n      console.log(isEnd); // if it is the end of data or not.\n    });\n\n    stream.on('end', function() { // emitted at the end of file\n      console.log('end');\n    });\n\n    stream.on('error', function(e) { // emitted when an error occurred\n      console.log(e);\n    });\n\n\n\n#### with Stream (like HttpResponse) ####\n    var https = require('https');\n    var req = https.request({host: 'github.com'}, function(response) {\n      var stream = new LineStream(response);\n\n      stream.on('data', function(line) {\n        console.log(line); // each line comes here\n      });\n\n      stream.on('end', function() { // emitted at the end of response\n        console.log('end'); \n      });\n\n      stream.on('error', function(e) { // emitted when an error occurred\n        console.log(e);\n      });\n    });\n    req.end();\n\n#### pipe  ####\n    var stream = new LineStream(__filename);\n    stream.pipe(process.stderr);\n\n### Notice ###\n* Currently, if you'd like to set CR or CRLF as a line separator, \nyou need to set the option like belows.\n    var stream = new LineStream(filename, {separator: '\\r'});   //CR\n    var stream = new LineStream(filename, {separator: '\\r\\n'}); // CRLF","maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}]},"0.2.9":{"name":"linestream","version":"0.2.9","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.2.9","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"e8cefdacda87a64448c00f017d7786623627bd16","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.2.9.tgz","integrity":"sha512-tOkQM1VUjNqU/W42Rh1Dl9DDcU42cGzCkZtKNK+AvCntm4HJs63eKcpBcxoKdSkk1SlL7bPa8AhMQLRiCz5XBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQcbzRrCIJvoWo3wwscJMS78K2qdla1FE9CkoW5/OuZAIhAKROqCnLRLtDV7r/ADtAmjCLlJesSrp6fDIOdEKH0Whq"}]},"readme":"LineStream.js 0.2.9\n==========\n[Node.js] EventEmitter which emits read-line events\n\nChange Log\n\n----------------\n* [0.0.1]: Release\n* [0.0.2]: Registered to npm\n* [0.1.0]: Implemented the interface of ReadableStream\n* [0.2.0]: Implemented resume()\n* [0.2.1]: Implemented pause()\n* [0.2.2]: the default value of options.trim be true\n* [0.2.3]: setEncoding('utf8') to given streams\n* [0.2.4]: if option.trim, the value after the last \\n is not emitted.\n* [0.2.5]: implemented filter function with fieldSep, fieldNum, empty, comment and filter()\n* [0.2.8]: LineStream.create() : for simple use\n* [0.2.9]: LineStream.tsv()\n\nOverview\n----------------\n### What's this? ###\n    A simple EventEmitter which emits read-line events\n    \n    var stream = new LineStream(__filename);\n    stream.on('data', function(line){\n      console.log(line);\n    });\n\n\n### Installation ###\n    git clone git://github.com/shinout/LineStream.git\n\n    OR\n\n    npm install linestream\n\n### Usage ###\n#### with file ####\n    var LineStream = require('/path/to/LineStream');\n    var stream = new LineStream(filename, {bufferSize: 300});\n\n    stream.on('data', function(line, isEnd) {\n      console.log(line); // each line comes here\n      console.log(isEnd); // if it is the end of data or not.\n    });\n\n    stream.on('end', function() { // emitted at the end of file\n      console.log('end');\n    });\n\n    stream.on('error', function(e) { // emitted when an error occurred\n      console.log(e);\n    });\n\n\n\n#### with Stream (like HttpResponse) ####\n    var https = require('https');\n    var req = https.request({host: 'github.com'}, function(response) {\n      var stream = new LineStream(response);\n\n      stream.on('data', function(line) {\n        console.log(line); // each line comes here\n      });\n\n      stream.on('end', function() { // emitted at the end of response\n        console.log('end'); \n      });\n\n      stream.on('error', function(e) { // emitted when an error occurred\n        console.log(e);\n      });\n    });\n    req.end();\n\n#### pipe  ####\n    var stream = new LineStream(__filename);\n    stream.pipe(process.stderr);\n\n### Notice ###\n* Currently, if you'd like to set CR or CRLF as a line separator, \nyou need to set the option like belows.\n    var stream = new LineStream(filename, {separator: '\\r'});   //CR\n    var stream = new LineStream(filename, {separator: '\\r\\n'}); // CRLF","maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}]},"0.3.0":{"name":"linestream","version":"0.3.0","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"776b508d5be4b140684fb4aa0f43fdb3f2a43547","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.3.0.tgz","integrity":"sha512-LbNaiHZms2iy8Uhq+e58TXZetdXadb9ngLPrxnt5hNrTb190RSr2dVZwZgQcdlRkFmam3+veQe+e56htNbgmEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0OsysbYpiKfKA0RuNlILDo3TpSaBBwHqL1enXoRARmgIhANe2AUMqIIcOn4HKLe4WOj/qEFyl9Zsqsc7dGRpuP/Sd"}]},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}]},"0.3.2":{"name":"linestream","version":"0.3.2","description":"a readable stream emitting lines (from files, streams)","tags":["stream","ReadableStream","EventEmitter","node","file","readline","line"],"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"},"bugs":{"url":"https://github.com/shinout/LineStream/issues"},"licences":[{"type":"MIT","url":"https://github.com/shinout/LineStream/raw/master/LICENCE"}],"main":"./LineStream.js","_npmUser":{"name":"shinout","email":"shinout310@gmail.com"},"_id":"linestream@0.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"dc2b11fa48cb04fa7d4df02f4b263323a0375e8c","tarball":"https://registry.npmjs.org/linestream/-/linestream-0.3.2.tgz","integrity":"sha512-/BMcpuU5U3YdS7p6xwHzohjkyG5q9/hcdnHjNMe6KvpbPKwSzG4jVgscK10K7t4jwUxKeQXAeFqh/IQH8ejCIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzwIpa2mnmVBNNXa4kGgkkViLiqnKJDg2KK54zUAGTYAIgFh8i4tj3TR0gJGxyxqG/0yJ+/mpi3zumrr7el3pd1mw="}]},"readme":"LineStream.js\n==========\n[Node.js] ReadableStream of lines\n\n## Installation ##\n\n    $ npm install linestream\n\n    OR\n\n    $ git clone git://github.com/shinout/LineStream.git\n\n## sample ##\n\n### with file ###\n\n    var stream = require('linestream').create(filename, {bufferSize: 300});\n\n    stream.on('data', function(line, isEnd) {\n      console.log(line); // each line comes here\n      console.log(isEnd); // if it is the end of data or not.\n    })\n\n    stream.on('end', function() { // emitted at the end of file\n      console.log('end');\n    });\n\n    stream.on('error', function(e) { // emitted when an error occurred\n      console.error(e);\n    });\n\n\n### with Stream (like HttpResponse) ###\n\n    var https = require('https');\n    var req = https.request({host: 'github.com'}, function(response) {\n      var stream = require('linestream').create(response);\n\n      stream.on('data', function(line) {\n        console.log(line); // each line comes here\n      });\n    });\n    req.end();\n\n## API Documentation ##\n\nLineStream extends ReadableStream.\n\nSee [Node.js#Stream](http://nodejs.org/docs/latest/api/streams.html#readable_Stream) for ReadableStream's API.\n\n\n- LineStream.create(source, options)\n- on \"data\"\n- LineStream.tsv(source, [options], fn)\n- stream.after(rstream1, rstream2, ...)\n\n### LineStream.create(source, options) ###\n\nCreates an instance of LineStream.\n\n**source** is the one of the followings.\n\n- (string) filename. Then reads the file and emit each lines.\n- \"-\". Then resumes **process.stdin** and reads from it.\n- (ReadableStream) stream. Then reads lines from the stream.\n\n(Object) **options** is optional.\n\n<table>\n<tr><th>key</th>\n<td>type</td>\n<td>description</td>\n<td>example</td></tr>\n\n<tr><th>separator</th>\n<td>string</td>\n<td>line separator. \"\\n\" by default.<br>\n</td>\n<td>\"\\r\"</td></tr>\n\n<tr><th>trim</th>\n<td>boolean</td>\n<td>If true, separator are not appended in the line. <strong>true by default</strong>.<br>\n</td>\n<td>false</td></tr>\n\n\n<tr><th>filter</th>\n<td>function</td>\n<td>filter function before emitting lines.<br>\neach line is passed to the function as the first argument.\n</td>\n<td>function (line) { return line.length }</td></tr>\n\n<tr><th>comment</th>\n<td>string</td>\n<td>Registers the marks of one-line comment.\nIf the mark comes in the first position of a line, the line is filtered.\n</td>\n<td>\"#\"</td></tr>\n\n<tr><th>fieldSep</th>\n<td>string</td>\n<td>A field separator. It is used with <strong>fieldNum</strong> options.\n</td>\n<td>\"\\t\"</td></tr>\n\n<tr><th>fieldNum</th>\n<td>string</td>\n<td>the required number of the fields.<br>\nIf not matched, the line is filtered.  </td>\n<td>6</td></tr>\n\n<tr><th>empty</th>\n<td>boolean</td>\n<td>If true, empty lines (after trimmed) are filtered.\n</td>\n<td>true</td></tr>\n\n</table>\n\nOther options are passed to **fs.createReadStream(filename, options)** if the first argument is a string.\n\nSee [fs.createReadStream()](http://nodejs.org/docs/latest/api/fs.html#fs.createReadStream)\n\n### on \"data\" ###\n\nData event of LineStream. Two arguments are passed.\n\n- **line**  (string)  each line\n- **isEnd** (boolean) whether the line is final or not.\n\nexample\n\n    stream.on(\"data\", function(line, isEnd) {\n      console.log([line, isEnd].join('\\t'));\n    });\n\n\n### LineStream.tsv(source, [options], fn) ###\n\nCreates an instance of LineStream, with field separated by \"\\t\".\n\n**source** and **options** are the same as **LineStream.create(source, options)**.\n\n**fn** is called on \"data\" event. Three arguments are passed.\n\n- **data** (Array)\n- **line** (string)\n- **isEnd** (boolean)\n\ndata is equivalent to line.split(\"\\t\")\n\nOther arguments are the same as original \"data\" event.\n\nReturns an instance of LineStream.\n\n\n### stream.after(rstream1, rstream2, ...) ###\nPauses the stream until all passed readable streams come to an end.\n\n    var ids = {};\n    var comingLines = LineStream.tsv('-', function(data, line, isEnd) { // reads from process.stdin\n      var id = data[0];\n      ids[id] = true;\n    });\n\n    LineStream.tsv('file1', function(data, line, isEnd) { // reads from \"file1\"\n      var id = data[0];\n      if (ids[id]) console.log(line);\n    })\n    .after(comingLines); // resumes after comingLines finished,\n","maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}]}},"maintainers":[{"name":"shinout","email":"shinout310@gmail.com"}],"time":{"modified":"2022-06-19T12:32:04.390Z","created":"2011-04-15T17:21:39.635Z","0.0.2":"2011-04-15T17:21:40.281Z","0.1.0":"2011-04-21T03:06:50.873Z","0.2.1":"2011-09-30T02:56:26.001Z","0.2.2":"2011-11-05T09:07:15.553Z","0.2.4":"2011-11-11T20:33:28.484Z","0.2.5":"2011-11-14T01:58:23.624Z","0.2.6":"2011-11-18T11:43:34.020Z","0.2.7":"2012-01-23T11:14:43.558Z","0.2.8":"2012-02-15T12:45:30.150Z","0.2.9":"2012-02-16T01:05:42.415Z","0.3.0":"2012-02-18T14:26:56.693Z","0.3.2":"2012-02-24T10:17:08.889Z"},"author":{"name":"SHIN Suzuki","email":"shinout310@gmail.com"},"repository":{"type":"git","url":"git://github.com/shinout/LineStream.git"}}