My fuzzy search.
fz(target: string, input: string, ignoreCase?: boolean): { matched: boolean, results: { matched: boolean , char: string }[] }
fz('GitHub', 'Gh')
{
matched: true,
results: [
{ matched: true, char: 'G' },
{ matched: false, char: 'i' },
{ matched: false, char: 't' },
{ matched: false, char: 'H' },
{ matched: false, char: 'u' },
{ matched: false, char: 'b' }
]
}
fz('GitHub', 'Gh', true)
{
matched: true,
results: [
{ matched: true, char: 'G' },
{ matched: false, char: 'i' },
{ matched: false, char: 't' },
{ matched: true, char: 'H' },
{ matched: false, char: 'u' },
{ matched: false, char: 'b' }
]
}