fuzzysearch
fuzzysearch copied to clipboard
new type for targets
Hello everyone. I want to ask you why this library uses string type for targets, not a Stringer interface or other. I think devs more often have to search in a slice of objects than in an array of raw strings. I suppose that this change type for targets will be useful.
No particular reason. It seemed obvious at the time. It's a shame string doesn't implement Stringer, otherwise it would be an easy thing to change 🤷♂️ Now it would be a backwards-incompatible change, which I'm not super keen on making.
I will consider adding a new set of functions that mirror the existing ones but accepts Stringer instead of string though 🤔
I'd say that probably new a set of functions maybe looks a boilerplate code.
I suggest thinking about a creation v2 package version includes incompatible change.
Anyway, thank you for paying attention to this topic.