index.d.ts 376 B

1234567891011
  1. /**
  2. * Get the count of the longest repeating streak of `substring` in `value`.
  3. *
  4. * @param {string} value
  5. * Content to search in.
  6. * @param {string} substring
  7. * Substring to look for, typically one character.
  8. * @returns {number}
  9. * Count of most frequent adjacent `substring`s in `value`.
  10. */
  11. export function longestStreak(value: string, substring: string): number