A simple javascript library searches term against list of strings using Cosine Similarity
To enable partial matches, the dataset and the search term are tokenized using NGram
const TextSearch = require('text-search')
index = new TextSearch({
fuzzyMatch: true,
nGramLowerLimit: 3,
nGramUpperLimit: 4,
dataSet: ['George', 'John', 'Thomas', 'James', 'Andrew']
})
console.log(index.search('Tho'))