1.0.5 • Published 3 years ago

try_a_trie v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

TryATrieCLI

Description

This CLI offers easy access to an online TRIE hosted on Firebase. You can perform standard tree operations and change the global state of the tree right from your console.

Installation:

Latest version:

npm install -g try_a_trie

Example Usage

$ tree add slingshot
Added word: slingshot
$ tree add sling
Added word: sling
$ tree add slant
Added word: slant
$ tree has slingshot
true
$ tree
└─ s
   └─ l
      ├─ a
      │  └─ n
      │     └─ t
      │        └─ leaf
      └─ i
         └─ n
            └─ g
               ├─ leaf
               └─ s
                  └─ h
                     └─ o
                        └─ t
                           └─ leaf
$ tree remove sling
Removed word: sling
$ tree
└─ s
   └─ l
      ├─ a
      │  └─ n
      │     └─ t
      │        └─ leaf
      └─ i
         └─ n
            └─ g
               └─ s
                  └─ h
                     └─ o
                        └─ t
                           └─ leaf
$ tree complete sl
[ 'slant', 'slingshot' ]

Misc.

All commands:

  tree add <word>         Add a keyword to the TRIE            
  tree remove <word>      Remove a keyword from the TRIE
  tree has <word>         Check if a word exists in the TRIE
  tree complete <prefix>  Find all words with the given prefix
  tree get                Show the entire tree (or just type 'tree')

Options:

  --help     Show help                                                
  --version  Show version number                                     
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago