Linewise
The linewise module splits a stream line-by-line with moderation of the input.
Benefits
- An unlimited amount of text can be processed
- A line or sequence of lines can for example be scanned for patterns
- Suitable for processing logs
Features
- Node stream interface
- Moderation of the input stream limits memory use
- Any read stream can be parsed, likewise output can be sent to any stream
Usage
var linewise = var fs = var inStream = fsvar parsedStream = linewiseparsedStreamparsedStreamparsedStreaminStreamparsedStream { console} { console} { throw Errorerr}
TODO
- Make it work for Windowsy Macy systems: '\r\n', '\r'
Notes
(c) Harald Rudell wrote this for the love of node in August, 2012
No warranty expressed or implied. Use at your own risk.
Please suggest better ways, new features, and possible difficulties on github