Filter list of words prefixed with given string (ideal for autocompletion)
import find from 'array-prefix'
prefix('he', ['hello', 'hector', 'hell', 'world', 'worm'])
// => ['hello', 'hector', 'hell']
// sort output
prefix('he', ['hello', 'hector', 'hell', 'world', 'worm'], true)
// => ['hector', 'hell', 'hello']npm install array-prefix