Releases: T-PWK/node-line-reader
Releases · T-PWK/node-line-reader
Release v0.0.2
LineFilter
class has been added.
LineFilter
class usage
var stream = getSomeReadableStream(); // Create read stream
var LineTransform = require('node-line-reader').LineTransform; // LineTransform constructor
var LineFilter = require('node-line-reader').LineFilter; // LineFilter constructor
var transform = new LineTransform();
// Skip empty lines and lines with "et" (with leading and trailing space) in them
var filter = new LineFilter({ skipEmpty: true, exclude: [/\bet\b/ });
// Pipe input from a file stream over to line transform and to the filter
stream.pipe(transform).pipe(filter);
filter.on('data', function(line) {
// line - single line of text from input file
});
filter.on('end', function() {
// no more text lines
});
Release v0.0.1
Initial release