trie-prefix

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i trie-prefix

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.5 kB

Total Files

8

Last publish

Collaborators

  • arjunmehta