bevacqua / fuzzysearch

:crystal_ball: Tiny and blazing-fast fuzzy search in JavaScript
https://ponyfoo.com
MIT License
2.71k stars 87 forks source link

Different from indexOf? #15

Closed laander closed 7 years ago

laander commented 7 years ago

I might be misunderstanding something here, but how is this different from:
haystack.indexOf(needle) >= 0

Is it faster?

bevacqua commented 7 years ago

It finds foo in frodo because frodo contains f, o, and o, somewhere, in that order.

laander commented 7 years ago

Ah, ofcourse. When i scanned the examples in README.md, I couldn't spot the "fuzzy" part of it - looked like a regular string search to me. You might want to make that a bit clearer 👍

Thanks