stream-normalize-eol
A duplex stream that normalizes the end of line characters.
API
var normalize = ;var stream = ; // pipe input and output streams to `stream`.
normalize(format)
Returns a duplex stream
that normalizes the end of line characters to the desired format.
format
is a string that can be one of the following:
- "\n": Unix format (LF) / default
- "\r\n": Windows format (CR/LF)
- "\r": Old Mac format (CR)
Example
var fs = ;var normalize = ; fs; var input = fs;var stream = ; stream; input; // prints "Hello\r\nWorld"
License
MIT