newline

A small module for detecting line endings in files.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
newline
300.0.39 years ago9 years agoMinified + gzip package size for newline in KB

Readme

newline Build Status

Install

Install with npm
npm install --save newline

Usage

// Detects the line ending used in the string source and returns "CR", "LF" or "CRLF"
newline.detect(source);

var newSource = newline.set(source, "LF"); // Sets the source to the specified line endings