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