stringzy
Version:
A versatile string manipulation library providing a range of text utilities for JavaScript and Node.js applications.
9 lines (8 loc) • 465 B
TypeScript
/**
* Calculates the percentage similarity between two texts using the selected algorithm.
* @param textA The first text to compare.
* @param textB The second text to compare.
* @param algorithm The algorithm to use: 'Levenshtein' or 'Damerau-Levenshtein'. Default is 'Levenshtein'.
* @returns Similarity percentage (0-100).
*/
export declare function stringSimilarity(textA: string, textB: string, algorithm?: 'Levenshtein' | 'Damerau-Levenshtein'): number;