helps to detect and change line endings in node.js strings
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tests
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

crlf-helper

Build Status (Travis)

helps to detect and change line endings in node.js strings

Installation

npm install crlf-helper

Usage

var crlf = require('crlf-helper');

var content = 'content\r\nwith line break'
var lineEnding = crlf.getLineEnding();
console.log(lineEnding);
// CRLF

var contentWithNewLineEnding = crlf.setLineEnding(content, 'LF');
console.log(contentWithNewLineEnding);
// content\nwith line break

Bugs and issues

If you find a bug or issues, please create an issue at github.