mattyork / fuzzy

Filters a list based on a fuzzy string search
MIT License
831 stars 86 forks source link

add weight to the match location #43

Open sakulstra opened 6 years ago

sakulstra commented 6 years ago

What I want to archive is the mentioned in the tests as todo.

      // TODO: Dont know how I feel about this. Sublime weights characters that
      // appear toward the beginning of the string a bit higher

https://github.com/mattyork/fuzzy/blob/master/test/fuzzy.test.js#L51

The practical usecase is that i have a list with languages and for eng the first result is not english, but bengalish.

Not sure if an exact duplicate, but at least related to: https://github.com/mattyork/fuzzy/issues/3 and I guess already fixed in https://github.com/mattyork/fuzzy/pull/12