longest

Get the length of the longest item in an array.

npm install longest
7 downloads in the last week
17 downloads in the last month

longest

Get the length of the longest item in an array.

Install with npm

npm i longest --save

Install with bower

bower install longest --save

Usage

var longest = require('longest');
var arr = ['a', 'bb', 'ccc'];
console.log(longest(arr));
//=> ccc

console.log(longest(arr).length);
//=> 3

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

npm loves you