fuzzySort
Ranks a list by how well each item matches a query.
Details #
fuzzySort(query, list) returns the items that match, best first, in the order of fuzzyMatch. Items that don't match are left out; ties keep their list order. An empty query returns the list unchanged.
Parameters #
Takes 2 arguments.
{{ fuzzySort(text, b) }}
Examples #
fuzzySort("set", ["Reset", "Settings", "Quit"])→
[
"Settings",
"Reset"
]Gotchas #
The items come back as they were given, not as text.