sensordb2 e64a8defe5 3.17 | il y a 1 an | |
---|---|---|
.. | ||
index.js | il y a 1 an | |
license | il y a 1 an | |
package.json | il y a 1 an | |
readme.md | il y a 1 an |
Detect the dominant newline character of a string
$ npm install --save detect-newline
const detectNewline = require('detect-newline');
detectNewline('foo\nbar\nbaz\r\n');
//=> '\n'
Returns detected newline or null
when no newline character is found.
Returns detected newline or \n
when no newline character is found.
MIT © Sindre Sorhus