Name Last Update
..
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.npmignore Loading commit data...
GruntFile.js Loading commit data...
README.md Loading commit data...
eol.js Loading commit data...
eol.min.js Loading commit data...
package.json Loading commit data...

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

License

MIT