simple indexing of strings for basic fuzzy search
var index = Index(['apple', 'orange', 'pear']);
index.search('ang') // true
index.search('pp') // true
index.search('ppp') // false
$ component install matthewmueller/index
Initialize an Index
, with an optional words
array.
Add a string or array of words
to the index.
Search for a string within the index. Returns true
if the string is present, otherwise false
.
MIT