max-line-length.js
Get maximum line length of a string
; //=> 18
Installation
Package managers
npm
npm install max-line-length
Bower
bower install max-line-length
Standalone
Download the script file and its dependency.
API
maxLineLength(string)
string: String
Return: Array
of Number
It returns length of the longest line in a string. "Line" means each part of a string splitted by \n
and \r\n
.
; //=> 7; //=> 0; //=> 0