R8244/node_modules/longest52a4aa7a2ec6master
R8244/node_modules/longest
52a4aa7a2ec6master
README.md
README.md
longest  
Get the longest item in an array.
Install with [npm](npmjs.org)
bash npm i longest --save
Install with bower
bash bower install longest --save
Running tests
Install dev dependencies.
bash npm i -d && npm test
Usage
js var longest = require('longest'); longest(['a', 'abcde', 'abc']); //=> 'abcde' longest(['a', 'abcde', 'abc']).length; //=> 5
- Related projects
- longest-value: Get the longest value for the given property from an array of objects. Useful for aligning values.
- right-align-values: Right align the values of a given property for each object in an array. Useful for creating text columns or tables.
- right-pad-values: Right pad the values of a given property for each object in an array. Useful for creating text columns or tables.
- repeat-string: Repeat the given string n times. Fastest implementation for repeating a string.
- pad-right: Right pad a string with zeros or a specified string. Fastest implementation.
- pad-left: Left pad a string with zeros or a specified string. Fastest implementation.
Running tests
Install dev dependencies.
bash npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
+ github/jonschlinkert + twitter/jonschlinkert
License
Copyright (c) 2015 Jon Schlinkert Released under the MIT license
_This file was generated by verb-cli on March 31, 2015._
c4science · Help