JSPM

newline

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10833
  • Score
    100M100P100Q130417F
  • License Artistic-2.0

A small module for detecting line endings in files.

Package Exports

  • newline

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (newline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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