.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / longest-streak / readme.md
1 # longest-streak
2
3 [![Build][build-badge]][build]
4 [![Coverage][coverage-badge]][coverage]
5 [![Downloads][downloads-badge]][downloads]
6 [![Size][size-badge]][size]
7
8 Count the longest repeating streak of a character.
9
10 ## Install
11
12 [npm][]:
13
14 ```sh
15 npm install longest-streak
16 ```
17
18 ## Use
19
20 ```js
21 var longestStreak = require('longest-streak')
22
23 longestStreak('` foo `` bar `', '`') // => 2
24 ```
25
26 ## API
27
28 ### `longestStreak(value, character)`
29
30 Get the count of the longest repeating streak of `character` in `value`.
31
32 ###### Parameters
33
34 *   `value` (`string`) — Content, coerced to string.
35 *   `character` (`string`) — Single character to look for.
36
37 ###### Returns
38
39 `number` — Number of characters at the place where `character` occurs in
40 its longest streak in `value`.
41
42 ###### Throws
43
44 *   `Error` — when `character` is not a single character string.
45
46 ## License
47
48 [MIT][license] © [Titus Wormer][author]
49
50 <!-- Definitions -->
51
52 [build-badge]: https://img.shields.io/travis/wooorm/longest-streak.svg
53
54 [build]: https://travis-ci.org/wooorm/longest-streak
55
56 [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg
57
58 [coverage]: https://codecov.io/github/wooorm/longest-streak
59
60 [downloads-badge]: https://img.shields.io/npm/dm/longest-streak.svg
61
62 [downloads]: https://www.npmjs.com/package/longest-streak
63
64 [size-badge]: https://img.shields.io/bundlephobia/minzip/longest-streak.svg
65
66 [size]: https://bundlephobia.com/result?p=longest-streak
67
68 [npm]: https://docs.npmjs.com/cli/install
69
70 [license]: license
71
72 [author]: https://wooorm.com