Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : readme.md
# 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.

## Install

[npm][]:

```sh
npm install longest-streak
```

## Use

```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] © [Titus Wormer][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
© 2026 GrazzMean