This repository is a mirror of the component module matthewmueller/index. It has been modified to work with NPM+Browserify. You can install it using the command npm install npmcomponent/matthewmueller-index
. Please do not open issues or send pull requests against this repo. If you have issues with this repo, report it to npmcomponent.
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