1.0.1 • Published 5 years ago

trie-prefix v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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