Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
LICENSE | D | 24-Sep-2023 | 1.1 KiB | 22 | 17 | |
README.md | D | 24-Sep-2023 | 2.2 KiB | 65 | 46 | |
index.js | D | 24-Sep-2023 | 509 | 38 | 24 | |
package.json | D | 24-Sep-2023 | 856 | 44 | 43 |
README.md
1# longest [](http://badge.fury.io/js/longest) [](https://travis-ci.org/jonschlinkert/longest) 2 3> Get the longest item in an array. 4 5## Install with [npm](npmjs.org) 6 7```bash 8npm i longest --save 9``` 10### Install with [bower](https://github.com/bower/bower) 11 12```bash 13bower install longest --save 14``` 15 16## Running tests 17Install dev dependencies. 18 19```bash 20npm i -d && npm test 21``` 22 23## Usage 24 25```js 26var longest = require('longest'); 27longest(['a', 'abcde', 'abc']); 28//=> 'abcde' 29 30longest(['a', 'abcde', 'abc']).length; 31//=> 5 32``` 33 34## Related projects 35* [longest-value](https://github.com/jonschlinkert/longest-value): Get the longest value for the given property from an array of objects. Useful for aligning values. 36* [right-align-values](https://github.com/jonschlinkert/right-align-values): Right align the values of a given property for each object in an array. Useful for creating text columns or tables. 37* [right-pad-values](https://github.com/jonschlinkert/right-pad-values): Right pad the values of a given property for each object in an array. Useful for creating text columns or tables. 38* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. 39* [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. 40* [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. 41 42## Running tests 43Install dev dependencies. 44 45```bash 46npm i -d && npm test 47``` 48 49## Contributing 50Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/longest/issues) 51 52## Author 53 54**Jon Schlinkert** 55 56+ [github/jonschlinkert](https://github.com/jonschlinkert) 57+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 58 59## License 60Copyright (c) 2015 Jon Schlinkert 61Released under the MIT license 62 63*** 64 65_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 31, 2015._