trie-prefix
v1.0.1
Published
A simple trie index implementation that includes case sensitivity
Downloads
2
Readme
trie-prefix
A modification/simplification of lyndseybrowning/trie-prefix-tree. Includes case-sensitivity.
Usage
Installation
npm install trie-prefix
Usage Example
const trie = require('trie-prefix')
const input = 'The Quick Brown Fox Jumped Over the Lazy Dog'.split(' ')
const isCaseSensitive = true
const index = (input, isCaseSensitive)
API
index.getPrefix(prefixString)
Gets all results that start with the prefix string.
index.tree()
Gets the raw trie object.
License
The MIT License (MIT) | 2019 Arjun Mehta