Repository navigation
|
hi, i'm building a datatable and for global search i'm using fuse as designed. creating the class and making a list of options. the best fit would be to just have a function that could take two strings and return true/false based on whether threshold is passed. would this be trivial for maintainer to implement? if no and i were to implement it, would such PR be merged? thanks for answer. |
Replies: 2 comments
|
Another use case for the exposed comparator would be to process stream objects. I'm pulling items out of a database, and it would be nice not to need to store the entire set, just the matches. |
|
Hey, sorry for the late reply. I've added a static import Fuse from 'fuse.js'
const { isMatch, score } = Fuse.match('apple', 'Paul likes apples')
// { isMatch: true, score: 0.11 }
// With options
Fuse.match('apple', 'apple pie', { includeMatches: true })
// { isMatch: true, score: 0, indices: [[0, 4]] }All the usual options ( This is now on |
Hey, sorry for the late reply.
I've added a static
Fuse.match()method that does exactly this — matches a pattern against a single string without needing to construct a full Fuse instance:All the usual options (
threshold,isCaseSensitive,minMatchCharLength, etc.) are supported.This is now on
main.