setup-go/node_modules/detect-newline
Stephen Franceschelli a966e84ff9 Fix.
2019-07-30 13:30:32 -04:00
..
index.js Fix. 2019-07-30 13:30:32 -04:00
license Fix. 2019-07-30 13:30:32 -04:00
package.json Fix. 2019-07-30 13:30:32 -04:00
readme.md Fix. 2019-07-30 13:30:32 -04:00

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