package
split/binary-split but lines contain byte offset in the source stream and gives access to last line fragment
npm install line-streamGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
split/binary-split but lines contain byte offset in the source stream and gives access to last line fragment
var linestream = require('line-stream');
var s = linestream();
s.on('data',function(line){
console.log('line of data ',line+'');
console.log('i come from ',line.start,'byte offset in the file')
})
fs.createReadStream(somefile).pipe(s);
Estimated unpacked size across 8 packages.
544.8 kB
Includes dependencies.