Socket
Socket
Sign inDemoInstall

autocomplete-string

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocomplete-string

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


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 07 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc