jam-cloud/jam-ui/node_modules/detect-newline
Nuwan 23d1ece36d fixing controller tests after upgradeing to rails5 2022-02-15 16:27:07 +05:30
..
index.js fixing controller tests after upgradeing to rails5 2022-02-15 16:27:07 +05:30
license fixing controller tests after upgradeing to rails5 2022-02-15 16:27:07 +05:30
package.json fixing controller tests after upgradeing to rails5 2022-02-15 16:27:07 +05:30
readme.md fixing controller tests after upgradeing to rails5 2022-02-15 16:27:07 +05:30

readme.md

detect-newline Build Status

Detect the dominant newline character of a string

Install

$ npm install --save detect-newline

Usage

const detectNewline = require('detect-newline');

detectNewline('foo\nbar\nbaz\r\n');
//=> '\n'

API

detectNewline(input)

Returns detected newline or null when no newline character is found.

detectNewline.graceful(input)

Returns detected newline or \n when no newline character is found.

License

MIT © Sindre Sorhus