trailing-newline
1.0.0 • Public • Published trailing-newline
Check whether a string ends with a newline on Unix or Windows.
Installing
$ npm install trailing-newline
API
trailingNewline(text)
-> Boolean
Checks whether the text
ends in a newline character (\n
or \r\n
).
trailingNewline('Hello world\n') === true;
trailingNewline('Hello world\r\n') === true;
Package Sidebar
Install
Weekly Downloads