caoge c760052ff9 机车状态修改 | vor 8 Monaten | |
---|---|---|
.. | ||
index.js | vor 8 Monaten | |
license | vor 8 Monaten | |
package.json | vor 8 Monaten | |
readme.md | vor 8 Monaten |
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