eol fix stream
End all the things with lf
.
Install
npm install --save eol-fix-stream
Use
var eolFix = require('eol-fix-stream');
var input = getInputStreamSomehow();
var output = getOutputStreamSomehow();
input.pipe(eolFix()).pipe(output);
For example, you can create a CLI module that reads standard input, fixes line endings, and writes to standard output in just two lines:
var eolFix = require('eol-fix-stream');
process.stdin.pipe(eolFix()).pipe(process.stdout);