browser-debugger-cli
Version:
DevTools telemetry in your terminal. For humans and agents. Direct WebSocket to Chrome's debugging port.
28 lines • 934 B
TypeScript
/**
* Levenshtein distance algorithm for fuzzy string matching.
*
* Calculates the minimum number of single-character edits (insertions,
* deletions, or substitutions) required to change one string into another.
*
* Used for providing helpful suggestions when users mistype command names,
* method names, or other identifiers.
*/
/**
* Calculate Levenshtein distance between two strings.
*
* The distance represents the minimum number of single-character edits needed
* to transform str1 into str2.
*
* @param str1 - First string
* @param str2 - Second string
* @returns Edit distance between the strings
*
* @example
* ```typescript
* levenshteinDistance('kitten', 'sitting'); // 3
* levenshteinDistance('saturday', 'sunday'); // 3
* levenshteinDistance('hello', 'hello'); // 0
* ```
*/
export declare function levenshteinDistance(str1: string, str2: string): number;
//# sourceMappingURL=levenshtein.d.ts.map