vue-word-highlighter icon indicating copy to clipboard operation
vue-word-highlighter copied to clipboard

Option to pass in a list of indices instead of a query.

Open anatolykopyl opened this issue 1 year ago • 0 comments

It would be nice to have this for use with fuzzy search, for example vueUse/useFuze. It outputs an array of arrays with start and end indices:

Taken from fuze.d.ts:

// Denotes the start/end indices of a match
//                 start    end
//                   ↓       ↓
type RangeTuple = [number, number]

export type FuseResultMatch = {
  indices: ReadonlyArray<RangeTuple>
  ...
}

anatolykopyl avatar Feb 26 '23 11:02 anatolykopyl