3 [![Build][build-badge]][build]
4 [![Coverage][coverage-badge]][coverage]
5 [![Downloads][downloads-badge]][downloads]
6 [![Size][size-badge]][size]
8 Count the longest repeating streak of a character.
15 npm install longest-streak
21 var longestStreak = require('longest-streak')
23 longestStreak('` foo `` bar `', '`') // => 2
28 ### `longestStreak(value, character)`
30 Get the count of the longest repeating streak of `character` in `value`.
34 * `value` (`string`) — Content, coerced to string.
35 * `character` (`string`) — Single character to look for.
39 `number` — Number of characters at the place where `character` occurs in
40 its longest streak in `value`.
44 * `Error` — when `character` is not a single character string.
48 [MIT][license] © [Titus Wormer][author]
52 [build-badge]: https://img.shields.io/travis/wooorm/longest-streak.svg
54 [build]: https://travis-ci.org/wooorm/longest-streak
56 [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg
58 [coverage]: https://codecov.io/github/wooorm/longest-streak
60 [downloads-badge]: https://img.shields.io/npm/dm/longest-streak.svg
62 [downloads]: https://www.npmjs.com/package/longest-streak
64 [size-badge]: https://img.shields.io/bundlephobia/minzip/longest-streak.svg
66 [size]: https://bundlephobia.com/result?p=longest-streak
68 [npm]: https://docs.npmjs.com/cli/install
72 [author]: https://wooorm.com