rtc

readline-trie-completer

readline-trie-completer =======================

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

readline-trie-completer

$ npm install readline-trie-completer

Example

var readline = require('readline');
var trieCompleter = require('./')();
var trie = trieCompleter.trie;

trie.insert('hello word');
trie.insert('work');
trie.insert('wonder');
trie.insert('world');
trie.insert('with');
trie.insert('wire');
trie.insert('trie');

var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  completer: trieCompleter.completer
});

rl.setPrompt(' › ');

rl.prompt();

Trie API

  • #insert(String) - Insert new word
  • #remove(String) - remove word
  • #complete(prefix) - Find all words with a given prefix

License

(The MIT License)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100