README.md
767 Bytes
eol
Newline character converter for JavaScript
API
eol.auto(text)
- Normalize line endings in text for the current operating system
-
@return string with line endings normalized to
\r\n
or\n
eol.crlf(text)
- Normalize line endings in text to CRLF (Windows, DOS)
-
@return string with line endings normalized to
\r\n
eol.lf(text)
- Normalize line endings in text to LF (Unix, OS X)
-
@return string with line endings normalized to
\n
eol.cr(text)
- Normalize line endings in text to CR (Mac OS)
-
@return string with line endings normalized to
\r