Linefeeds
File line-endings conversion between CRLF and LF.
TypeScript definitions included (1.6+)
Installation
npm install linefeeds --save
Usage
Example:
;;var input = 'input.txt'; /** * Without no output provided, it will replace the input file */var console; // Synchronously convert to LFlf; // Asynchronously convert back to CRLFlf; // Use a stream convert to LF againvar write = fs;lf;
Just want to convert a body of text that you already have in memory?
No problem!
var text = 'some\nbody\nof\ntext';var target = 'output.txt'; // Asynchronouslylf; // Synchronouslylf; // Streamvar write = fs;lf;
License
MIT