@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
15 lines • 631 B
TypeScript
/**
* Calculate the Jaro-Winkler distance between two strings.
* Useful for sorting and fuzzy matching.
*
* @param {string} first The string to compare
* @param {string} second The string to compare with
* @returns {number} similarity score, higher value means strings are more similar, between 0 and 1
*
* @example
* string_jaro_winkler("Hello", "Hello") === 1
* string_jaro_winkler("apple", "orange") === 0.58
* string_jaro_winkler("how are you?", "are you good?") === 0.74
*/
export function string_jaro_winkler(first: string, second: string): number;
//# sourceMappingURL=string_jaro_winkler.d.ts.map