<commit_before># longest-streak [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

Count the longest repeating streak of a character.

## Installation

[npm][]:

```bash
npm install longest-streak
```

## Usage

```js
var longestStreak = require('longest-streak')

longestStreak('` foo `` bar `', '`') // => 2
```

## API

### `longestStreak(value, character)`

Get the count of the longest repeating streak of `character` in `value`.

###### Parameters

*   `value` (`string`) — Content, coerced to string.
*   `character` (`string`) — Single character to look for.

###### Returns

`number` — Number of characters at the place where `character` occurs in
its longest streak in `value`.

###### Throws

*   `Error` — when `character` is not a single character string.

## License

[MIT][license] © [<NAME>][author]

<!-- Definitions -->

[travis-badge]: https://img.shields.io/travis/wooorm/longest-streak.svg

[travis]: https://travis-ci.org/wooorm/longest-streak

[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg

[codecov]: https://codecov.io/github/wooorm/longest-streak

[npm]: https://docs.npmjs.com/cli/install

[license]: license

[author]: https://wooorm.com<commit_msg>Add more badges<commit_after># longest-streak

[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

Count the longest repeating streak of a character.

## Installation

[npm][]:

```bash
npm install longest-streak
```

## Usage

```js
var longestStreak = require('longest-streak')

longestStreak('` foo `` bar `', '`') // => 2
```

## API

### `longestStreak(value, character)`

Get the count of the longest repeating streak of `character` in `value`.

###### Parameters

*   `value` (`string`) — Content, coerced to string.
*   `character` (`string`) — Single character to look for.

###### Returns

`number` — Number of characters at the place where `character` occurs in
its longest streak in `value`.

###### Throws

*   `Error` — when `character` is not a single character string.

## License

[MIT][license] © [<NAME>][author]

<!-- Definitions -->

[build-badge]: https://img.shields.io/travis/wooorm/longest-streak.svg

[build]: https://travis-ci.org/wooorm/longest-streak

[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg

[coverage]: https://codecov.io/github/wooorm/longest-streak

[downloads-badge]: https://img.shields.io/npm/dm/longest-streak.svg

[downloads]: https://www.npmjs.com/package/longest-streak

[size-badge]: https://img.shields.io/bundlephobia/minzip/longest-streak.svg

[size]: https://bundlephobia.com/result?p=longest-streak

[npm]: https://docs.npmjs.com/cli/install

[license]: license

[author]: https://wooorm.com
{'fraction_non_alphanumeric': 0.1871676710386388, 'fraction_numerical': 0.0007089684509039348, 'mean_word_length': 4.712550607287449, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5337966', 'n_tokens_mistral': 1038, 'n_tokens_neox': 996, 'n_words': 225}