Possible Duplicate:
javascript text similarity Algorithm
I'd like to know whether there is any library, in JavaScript, to measure the similarity of two strings (like "john" and "Johhn"). In postgresql I'm using the pg_trgm module, which works with trigrams. I'd like to know what is available in JavaScript.
The only one found so far is one based on the Levenshtein distance.