tripokey/elm-fuzzy/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Fuzzy

This is library for performing fuzzy string matching.

Matching

match : String -> String -> Float

Perform fuzzy matching between a String (needle) and another String (hay). The order of the arguments are significant. Lower score is better.

Fuzzy.match "test" "test" == 0
Fuzzy.match "tst" "test" == 0.001
List.sortBy (Fuzzy.match "hrdevi") ["screen", "disk", "harddrive", "keyboard", "mouse", "computer"] == ["harddrive","disk","screen","mouse","keyboard","computer"]