ajitid / fzf-for-js

Do fuzzy matching using FZF algorithm in JavaScript
https://fzf.netlify.app
BSD 3-Clause "New" or "Revised" License
887 stars 21 forks source link

Thank you for this library #99

Closed deadcoder0904 closed 2 years ago

deadcoder0904 commented 2 years ago

I was using fuse.js but 530 wasn't working for my timezone. See this in action, still using fuse.js but it worked with fzf

README must be updated to include options field as I got TS error when setting up new Fzf:

expected 2 parameters, given only 1

Thank you 🎉

ajitid commented 2 years ago

Hey Akshay, the second parameter is required in your case as timezonesList is not a plain list of strings. To understand how you could use FZF correctly, please have a look at https://fzf.netlify.app/docs/latest#usage-non-string-list

deadcoder0904 commented 2 years ago

ah, makes sense. i think it should be added to the readme as well with little note as it's a more common approach to use objects than arrays :)

ajitid commented 2 years ago

to use objects than arrays

I suppose you meant to use objects than strings.

The readme only contains a "quick look", we have dedicated website for documentation as mentioned in my previous comment — https://fzf.netlify.app.

deadcoder0904 commented 2 years ago

I suppose you meant to use objects than strings.

yes!

The readme only contains a "quick look"

yeah, but most people won't visit the website as they can see the code right in front of their eyes so it helps having options

bcz i did exactly that. copy-pasted from the readme as it's simple 3-steps so no need to visit the docs but then TS yelled.

definitely not that important that's why i didn't open an issue :)