|
|
7 лет назад | |
|---|---|---|
| .. | ||
| index.js | 7 лет назад | |
| license | 7 лет назад | |
| package.json | 7 лет назад | |
| readme.md | 7 лет назад | |
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