Skip to content

Releases: T-PWK/node-line-reader

Release v0.0.2

25 Nov 14:59
Compare
Choose a tag to compare

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

15 Nov 19:21
Compare
Choose a tag to compare
Release v0.0.1 Pre-release
Pre-release

Initial release