Socket
Socket
Sign inDemoInstall

autocomplete-trie

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocomplete-trie

Autocomplete trie impl for node and the browser


Version published
Maintainers
1
Created
Source

autocomplete-trie


npm install autocomplete-trie

var Autocomplete = require('autocomplete-trie')

var autocomplete = new Autocomplete([
  'aaa',
  'aba',
  'abc',
  'abd',
  'aca',
  'ada',
  'adb',
  'acb',
  'baa',
  'bab',
  'bac',
  'bad',
  'bba',
  'bca',
  'bdc',
  'bda',
  'bdb'
]);


console.log(autocomplete.search('a'))
console.log(autocomplete.search('ab'))
console.log(autocomplete.search('abc'))
console.log(autocomplete.search('b'))
console.log(autocomplete.search('ba'))
console.log(autocomplete.search('bac'))
console.log(autocomplete.search('bad'))

Thanks to marc.e.campbell@gmail.com for his original work on the node-autocomplete package.

This package is set to a fork of the original with new code to be shipped and general improvements needed for Minerlabs to utilize the code.

Among first changes are less module cruft, and improved api.

FAQs

Package last updated on 05 Aug 2015

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