antv-l7/node_modules/eol
thinkinggis f7e5376b7d fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
..
.editorconfig fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
.eslintrc.json fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
.gitattributes fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
.npmignore fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
LICENSE fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
README.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
eol.d.ts fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
eol.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
index.html fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
package.json fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
style.css fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
test.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
ui.js fix(fix css): fix css png 2019-11-22 18:04:14 +08:00

README.md

eol

Newline character converter for JavaScript

npm install eol --save
var eol = require('eol')

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

eol.before(text)

  • Add linebreak before text
  • @return string with linebreak added before text

eol.after(text)

  • Add linebreak after text
  • @return string with linebreak added after text

eol.split(text)

  • Split text by newline
  • @return array of lines

License

MIT