Escape period?
nathanforce opened this issue · comments
Nathan Force commented
match-sorter
version: 2.3.0node
version:npm
(oryarn
) version:
Relevant code or config
const placeholders = [{ searchTerms: [project!.slug, 'slug', 'project.slug'] }];
const matches = matchSorter(placeholders, 'project.slug', {
keys: ['searchTerms'],
});
What you did: Searching for the string "project.slug"
returns an empty result.
Problem description: I want to be able to search for the string "project.slug"
and match the item in the placeholders array.
Suggested solution: ?
Kent C. Dodds commented
Hmmm... Seems like a bug I think. Could you make a reproduction you and I (and anyone else) can look into?
Nathan Force commented
Nevermind. The bug was caused by another lib (the one providing my searchTerm
) not allowing period. Sorry for wasting your time!
HOT TAKE: match-sorter is your best lib
Kent C. Dodds commented
I'm glad you like it!