Skip to content

📯Pure javascript module which returns an object with autocomplete informations by a given string an suggestions array

License

Notifications You must be signed in to change notification settings

entwicklerstube/autocomplete-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autocomplete-string Build Status

Pass an array of options and an input string and get a suggestion and a completion string

Install

$ npm install autocomplete-string

Usage

import autocomplete from 'autocomplete-string';

autocomplete('foo', ['hello', 'FoobaR', 'foobaz', 'world']);
/*
  {
    completion: 'baR',
    suggestion: 'Foobar',
    suggestionIndex: 1
  }
*/

API

autocomplete(input, [list])

Returns the first path found (by respecting the order) or undefined if none could be found.

input

Type: string

HeyHa

list

Type: array

Foobar

License

MIT © entwicklerstube

About

📯Pure javascript module which returns an object with autocomplete informations by a given string an suggestions array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published