Normalize the newline characters in a string to
\n
npm install --global normalize-newline-cli
$ normalize-newline --help
Usage
$ normalize-newline <string>
$ cat file.txt | normalize-newline
Example
$ cat mixed-newlines.txt | normalize-newline > lf-newlines.txt
- normalize-newline - API for this module