detect-newline
Detect the dominant newline character of a string
Install
Usage
API
detectNewline(input)
Returns detected newline or null
when no newline character is found.
detectNewline.graceful(input)
Returns detected newline or when no newline character is found.
Related
detect-newline-cli - CLI for this module
detect-indent - Detect the indentation of code
License
MIT © Sindre Sorhus
Last updated