Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.

This commit is contained in:
becarta
2025-05-23 12:43:00 +02:00
parent f40db0f5c9
commit a544759a3b
11127 changed files with 1647032 additions and 0 deletions

36
node_modules/longest-streak/index.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
/**
* Get the count of the longest repeating streak of `substring` in `value`.
*
* @param {string} value
* Content to search in.
* @param {string} substring
* Substring to look for, typically one character.
* @returns {number}
* Count of most frequent adjacent `substring`s in `value`.
*/
export function longestStreak(value, substring) {
const source = String(value)
let index = source.indexOf(substring)
let expected = index
let count = 0
let max = 0
if (typeof substring !== 'string') {
throw new TypeError('Expected substring')
}
while (index !== -1) {
if (index === expected) {
if (++count > max) {
max = count
}
} else {
count = 1
}
expected = index + substring.length
index = source.indexOf(substring, expected)
}
return max
}