{"_id":"longest-streak","_rev":"267282","name":"longest-streak","description":"Count the longest repeating streak of a substring","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T19:08:58.000Z","created":"2015-07-12T16:25:39.718Z","3.1.0":"2022-11-15T12:13:29.629Z","3.0.1":"2021-10-27T08:14:59.639Z","3.0.0":"2021-03-08T08:38:00.369Z","2.0.4":"2020-01-25T10:32:03.716Z","2.0.3":"2019-05-13T07:02:41.898Z","2.0.2":"2017-11-08T22:56:08.649Z","2.0.1":"2016-11-26T12:12:04.659Z","2.0.0":"2016-11-11T11:01:25.006Z","1.0.0":"2015-07-12T16:25:39.718Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"versions":{"3.1.0":{"name":"longest-streak","version":"3.1.0","description":"Count the longest repeating streak of a substring","license":"MIT","keywords":["count","length","longest","repeating","streak","substring","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.52.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"fe3a930de34ad4a792d343fe6d1bcf390627881f","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@3.1.0","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"shasum":"62fa67cd958742a1574af9f39866364102d90cd4","size":3199,"noattachment":false,"key":"/longest-streak/-/longest-streak-3.1.0.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-3.1.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak_3.1.0_1668514409514_0.05884238943675224"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-15T12:46:12.625Z","publish_time":1668514409629,"_cnpm_publish_time":1668514409629},"3.0.1":{"name":"longest-streak","version":"3.0.1","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.45.0"},"scripts":{"prepublishOnly":"npm run build && npm run format","build":"rimraf \"test/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"8ba30dcaf366de35da27b8fb2958439d0bc9d438","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@3.0.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"c97315b7afa0e7d9525db9a5a2953651432bdc5d","size":3061,"noattachment":false,"key":"/longest-streak/-/longest-streak-3.0.1.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-3.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak_3.0.1_1635322499484_0.4409394979982906"},"_hasShrinkwrap":false,"publish_time":1635322499639,"_cnpm_publish_time":1635322499639,"_cnpmcore_publish_time":"2021-12-16T10:39:56.160Z"},"3.0.0":{"name":"longest-streak","version":"3.0.0","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","typescript":"^4.0.0","xo":"^0.38.0"},"scripts":{"prepublishOnly":"npm run build","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","prebuild":"rimraf \"*.d.ts\"","build":"tsc","test-api":"node test","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"dc30da252da3a7a4e04e28c976c2d41c198b9096","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@3.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.1","dist":{"shasum":"f127e2bded83caa6a35ac5f7a2f2b2f94b36f3dc","size":2556,"noattachment":false,"key":"/longest-streak/-/longest-streak-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-3.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak_3.0.0_1615192680216_0.7038340055096324"},"_hasShrinkwrap":false,"publish_time":1615192680369,"_cnpm_publish_time":1615192680369},"2.0.4":{"name":"longest-streak","version":"2.0.4","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","tinyify":"^2.0.0","xo":"^0.25.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s longestStreak -o longest-streak.js","build-mangle":"browserify . -s longestStreak -p tinyify -o longest-streak.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["longest-streak.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"b5ac7d3dfa85ecae4a4bbd405e0ba32b37918da3","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@2.0.4","_nodeVersion":"13.0.1","_npmVersion":"6.13.6","dist":{"shasum":"b8599957da5b5dab64dee3fe316fa774597d90e4","size":2350,"noattachment":false,"key":"/longest-streak/-/longest-streak-2.0.4.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-2.0.4.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak_2.0.4_1579948323451_0.6584412424928139"},"_hasShrinkwrap":false,"publish_time":1579948323716,"_cnpm_publish_time":1579948323716},"2.0.3":{"name":"longest-streak","version":"2.0.3","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^14.0.0","prettier":"^1.12.1","remark-cli":"^6.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.6.2","tinyify":"^2.5.0","xo":"^0.24.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s longestStreak -o longest-streak.js","build-mangle":"browserify . -s longestStreak -p tinyify -o longest-streak.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["longest-streak.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"16f325c755539dbe91afba8c2277edcf5452792d","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@2.0.3","_nodeVersion":"11.9.0","_npmVersion":"6.9.0","dist":{"shasum":"3de7a3f47ee18e9074ded8575b5c091f5d0a4105","size":2331,"noattachment":false,"key":"/longest-streak/-/longest-streak-2.0.3.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-2.0.3.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak_2.0.3_1557730961798_0.6144815316024137"},"_hasShrinkwrap":false,"publish_time":1557730961898,"_cnpm_publish_time":1557730961898},"2.0.2":{"name":"longest-streak","version":"2.0.2","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^14.0.0","esmangle":"^1.0.0","nyc":"^11.0.0","remark-cli":"^4.0.0","remark-preset-wooorm":"^3.0.0","tape":"^4.6.2","xo":"^0.18.0"},"scripts":{"build-md":"remark . -qfo","build-bundle":"browserify index.js --bare -s longestStreak > longest-streak.js","build-mangle":"esmangle longest-streak.js > longest-streak.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"esnext":false,"ignores":["longest-streak.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"1fb5f0c8347aa908259da09a650d5b218d06f2a3","homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@2.0.2","_npmVersion":"5.5.1","_nodeVersion":"9.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"2421b6ba939a443bb9ffebf596585a50b4c38e2e","size":2184,"noattachment":false,"key":"/longest-streak/-/longest-streak-2.0.2.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-2.0.2.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/longest-streak-2.0.2.tgz_1510181767760_0.7836892842315137"},"directories":{},"publish_time":1510181768649,"_hasShrinkwrap":false,"_cnpm_publish_time":1510181768649},"2.0.1":{"name":"longest-streak","version":"2.0.1","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/afinn-111.git"},"bugs":{"url":"https://github.com/wooorm/afinn-111/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^13.0.0","esmangle":"^1.0.0","nyc":"^10.0.0","remark-cli":"^2.1.0","remark-preset-wooorm":"^1.0.0","tape":"^4.6.2","xo":"^0.17.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js --bare -s longestStreak > longest-streak.js","build-mangle":"esmangle longest-streak.js > longest-streak.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"ignores":["longest-streak.js"]},"remarkConfig":{"presets":"wooorm"},"gitHead":"e80b37784f848386c147b919da9bb562762101fe","homepage":"https://github.com/wooorm/afinn-111#readme","_id":"longest-streak@2.0.1","_shasum":"42d291b5411e40365c00e63193497e2247316e35","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"42d291b5411e40365c00e63193497e2247316e35","size":2184,"noattachment":false,"key":"/longest-streak/-/longest-streak-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-2.0.1.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/longest-streak-2.0.1.tgz_1480162322732_0.5209639631211758"},"directories":{},"publish_time":1480162324659,"_cnpm_publish_time":1480162324659,"_hasShrinkwrap":false},"2.0.0":{"name":"longest-streak","version":"2.0.0","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"repository":{"type":"git","url":"git+https://github.com/wooorm/afinn-111.git"},"bugs":{"url":"https://github.com/wooorm/afinn-111/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^13.0.0","esmangle":"^1.0.0","nyc":"^8.4.0","remark-cli":"^2.1.0","remark-preset-wooorm":"^1.0.0","tape":"^4.6.2","xo":"^0.17.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js --bare -s longestStreak > longest-streak.js","build-mangle":"esmangle longest-streak.js > longest-streak.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"ignores":["longest-streak.js"]},"remarkConfig":{"presets":"wooorm"},"gitHead":"f34cd3335e6788c7e1d1c74e394e848d31e20090","homepage":"https://github.com/wooorm/afinn-111#readme","_id":"longest-streak@2.0.0","_shasum":"a01853368f1af0dbef93199737225841bceea481","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"a01853368f1af0dbef93199737225841bceea481","size":2184,"noattachment":false,"key":"/longest-streak/-/longest-streak-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-2.0.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/longest-streak-2.0.0.tgz_1478862083269_0.025801390875130892"},"directories":{},"publish_time":1478862085006,"_cnpm_publish_time":1478862085006,"_hasShrinkwrap":false},"1.0.0":{"name":"longest-streak","version":"1.0.0","description":"Count the longest repeating streak of a character","license":"MIT","keywords":["count","length","longest","repeating","streak","character"],"files":["index.js","LICENSE"],"repository":{"type":"git","url":"git+https://github.com/wooorm/longest-streak.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"devDependencies":{"browserify":"^10.0.0","eslint":"^0.24.0","esmangle":"^1.0.0","istanbul":"^0.3.0","jscs":"^1.0.0","jscs-jsdoc":"^1.0.0","mdast":"^0.26.0","mdast-github":"^0.3.1","mdast-lint":"^0.4.1","mdast-yaml-config":"^0.2.0","mocha":"^2.0.0"},"scripts":{"test-api":"mocha --check-leaks test.js","test-coveralls":"istanbul cover _mocha --report lcovonly -- --check-leaks test.js","test-coverage":"istanbul cover _mocha -- --check-leaks test.js","test-travis":"npm run test-coveralls","test":"npm run test-api","lint-api":"eslint .","lint-style":"jscs --reporter inline .","lint":"npm run lint-api && npm run lint-style","make":"npm run lint && npm run test-coverage","build-md":"mdast . LICENSE --output --quiet","build-bundle":"browserify index.js --bare -s longestStreak > longest-streak.js","postbuild-bundle":"esmangle longest-streak.js > longest-streak.min.js","build":"npm run build-md && npm run build-bundle"},"gitHead":"77606ef995c1825d353f1a12ef7ded403df67c52","bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"homepage":"https://github.com/wooorm/longest-streak#readme","_id":"longest-streak@1.0.0","_shasum":"d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.3","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965","size":2475,"noattachment":false,"key":"/longest-streak/-/longest-streak-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/longest-streak/download/longest-streak-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"directories":{},"publish_time":1436718339718,"_cnpm_publish_time":1436718339718,"_hasShrinkwrap":false}},"readme":"# longest-streak\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nGet the count of the longest repeating streak of `substring` in `value`.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`longestStreak(value, substring)`](#longeststreakvalue-substring)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis is a tiny package that finds the count of the longest adjacent repeating\nsubstring.\n\n## When should I use this?\n\nThis package is rather niche.\nI use it for serializing markdown ASTs (particularly fenced code and math).\n\nYou can use [`ccount`][ccount] if you need the total count of substrings\noccuring in a value.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install longest-streak\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {longestStreak} from 'https://esm.sh/longest-streak@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {longestStreak} from 'https://esm.sh/longest-streak@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {longestStreak} from 'longest-streak'\n\nlongestStreak('` foo `` bar `', '`') // => 2\n```\n\n## API\n\nThis package exports the identifier `longestStreak`.\nThere is no default export.\n\n### `longestStreak(value, substring)`\n\nGet the count of the longest repeating streak of `substring` in `value`.\n\n###### Parameters\n\n*   `value` (`string`) — content to search in\n*   `substring` (`string`) — substring to look for, typically one character\n\n###### Returns\n\nCount of most frequent adjacent `substring`s in `value` (`number`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`wooorm/ccount`](https://github.com/wooorm/ccount)\n    — count the total number of `substring`s in `value`\n*   [`wooorm/direction`](https://github.com/wooorm/direction)\n    — detect directionality: left-to-right, right-to-left, or neutral\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/longest-streak/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/longest-streak/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg\n\n[coverage]: https://codecov.io/github/wooorm/longest-streak\n\n[downloads-badge]: https://img.shields.io/npm/dm/longest-streak.svg\n\n[downloads]: https://www.npmjs.com/package/longest-streak\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/longest-streak.svg\n\n[size]: https://bundlephobia.com/result?p=longest-streak\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esmsh]: https://esm.sh\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[ccount]: https://github.com/wooorm/ccount\n","_attachments":{},"homepage":"https://github.com/wooorm/longest-streak#readme","bugs":{"url":"https://github.com/wooorm/longest-streak/issues"},"license":"MIT"}