1.0.0 • Published 11 years ago
trailing-newline v1.0.0
trailing-newline 
Check whether a string ends with a newline on Unix or Windows.
Installing
$ npm install trailing-newlineAPI
trailingNewline(text) -> Boolean
Checks whether the text ends in a newline character (\n or \r\n).
// unix
trailingNewline('Hello world\n') === true;
// windows
trailingNewline('Hello world\r\n') === true;1.0.0
11 years ago