Newline character converter for JavaScript
npm install eol --save
var eol = require('eol')
- Normalize line endings in text for the current operating system
- @return string with line endings normalized to
\r\n
or\n
- Normalize line endings in text to CRLF (Windows, DOS)
- @return string with line endings normalized to
\r\n
- Normalize line endings in text to LF (Unix, OS X)
- @return string with line endings normalized to
\n
- Normalize line endings in text to CR (Mac OS)
- @return string with line endings normalized to
\r
- Add linebreak before text
- @return string with linebreak added before text
- Add linebreak after text
- @return string with linebreak added after text
- Split text by newline
- @return array of lines
MIT