acany : simple support to autocomplete. receve a list and a word
return a list math in sort of less diff, but this not sort your initial list
I will help if you have any difficulty =)
Contact me by github:heyderpd. I'll be glad to help you.
npm~lucasmreis
Thanks fornpm install --save acany
Example:
const acany = const list = 'hot coffee' 'chocolate' 'hot coffee with chocolate' 'coffee' found = // found = [ 'coffee', 'hot coffee', 'hot coffee with chocolate' ] found = // found = [ 'hot coffee', 'hot coffee with chocolate' ] found = // found = [ 'hot coffee with chocolate' ]
Full Example:
// acany(_NEED_, _LIST_, _LIMIT_) const list = 'aaa' 'yxuu' 'abb' 'xbbc' 'xc' 'xx cc' 'bbc' 'ccc' 'xccc' found = // found = [ 'xc', 'xccc', 'xbbc', 'xx cc' ] found = // found = [ 'xbbc', 'xc', 'xx cc', 'xccc' ] found = // found = [ 'xbbc', 'xc' ]