Gathering detailed insights and metrics for longest-streak
Gathering detailed insights and metrics for longest-streak
Gathering detailed insights and metrics for longest-streak
Gathering detailed insights and metrics for longest-streak
longest
Get the longest item in an array.
diff-sequences
Compare items in two sequences to find a longest common subsequence
string-comparison
A library implementing different string similarity
longest-value
Get the longest value for the given property from an array of objects, or the longest value in an object. Useful for aligning values for text tables, CLI help, etc.
Count the longest repeating streak of a substring
npm install longest-streak
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
9 Stars
70 Commits
4 Watching
1 Branches
2 Contributors
Updated on 08 Sept 2023
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-1.3%
1,336,627
Compared to previous day
Last week
4%
7,101,358
Compared to previous week
Last month
15.7%
29,258,252
Compared to previous month
Last year
35.1%
288,397,789
Compared to previous year
Get the count of the longest repeating streak of substring
in value
.
This is a tiny package that finds the count of the longest adjacent repeating substring.
This package is rather niche. I use it for serializing markdown ASTs (particularly fenced code and math).
You can use ccount
if you need the total count of substrings
occuring in a value.
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
1npm install longest-streak
In Deno with esm.sh
:
1import {longestStreak} from 'https://esm.sh/longest-streak@3'
In browsers with esm.sh
:
1<script type="module"> 2 import {longestStreak} from 'https://esm.sh/longest-streak@3?bundle' 3</script>
1import {longestStreak} from 'longest-streak' 2 3longestStreak('` foo `` bar `', '`') // => 2
This package exports the identifier longestStreak
.
There is no default export.
longestStreak(value, substring)
Get the count of the longest repeating streak of substring
in value
.
value
(string
) — content to search insubstring
(string
) — substring to look for, typically one characterCount of most frequent adjacent substring
s in value
(number
).
This package is fully typed with TypeScript. It exports no additional types.
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
This package is safe.
wooorm/ccount
— count the total number of substring
s in value
wooorm/direction
— detect directionality: left-to-right, right-to-left, or neutralYes please! See How to Contribute to Open Source.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More