Utilities | heartbeat | mono | Search

levenshtein

Find the levenshtein distance

This code calculates the Levenshtein distance between two strings, which represents the minimum number of edits (insertions, deletions, or substitutions) needed to transform one string into the other. It uses a dynamic programming approach to efficiently compute this distance.

Sort by levenshtein distance

The levSort function sorts an array of objects based on how similar their strings are to a given search string, using the Levenshtein distance as the similarity measure.

search levenshtein distance

This code implements a fuzzy search function, levSearch, that finds objects in a dataset based on the closest match to a given search term using Levenshtein distance.