@metacorp/html-trie

0.1.2 • Public • Published

Html Trie

Html binding for Trie

Build Status

Installation

NPM

npm install @metacorp/html-trie @metacorp/trie

CDN

<script src="https://unpkg.com/@metacorp/trie"></script>
<script src="https://unpkg.com/@metacorp/trie-html"></script>

Usage

Initialize Trie with an array of data.

const htmlTrie = new HtmlTrie(Trie, ['Apple', 'Lemon', 'Orange', 'Tomato'])

Now bind an input with searchBox

htmlTrie.searchBox({
  container: document.getElementById('searchBox')
})

And an result element with hits

htmlTrie.hits({
  container: document.getElementById('hits')
})

Configuration

// Don't preprocess at all
HtmlTrie.config.hitClassName = 'result-item'

License

Licensed under the MIT License

Copyright (c) Meta l.szabatura@gmail.com

Readme

Keywords

Package Sidebar

Install

npm i @metacorp/html-trie

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • metacorp