-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
It's entirely possible I'm reaching for the wrong tool for this task...
I'm working on a purely client-side SPA. I have a master list of items and user input that is a comma separated list of item-like strings, and I want to filter the master list to the matching user items (while being tolerant of small misspellings/typos/casing)...
That is, given:
const allFruits = [
"Apple",
"Banana",
"Cherry",
"Grape",
"Kiwi",
"Mango",
"Orange",
"Peach",
"Pineapple",
"Strawberry"
];
const myFruits = "apple, orange, cherry";I want to filter allFruits to ["Apple", "Cherry", "Orange"] (yes, I need to remember to set interLft=2 to avoid including "Pineapple").
I certainly can handle running n searches, and unioning the results. Will that be less than optimally performant (having to re-perform a lot search prep)? Would it ever make sense for uFuzzy to offer a multi filter API that accepted an array of "needles"?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels