+
Skip to content

noncombatant/trie.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple JavaScript Trie

This is a simple implementation of a trie in JavaScript. It can map any iterable type (string, array, et c.) to any type.

It would be helpful if something like this were in the JavaScript standard library. It’s surprisingly applicable in e.g. autocomplete and search UIs. Until then, you can grab this, and package it up however is convenient for you.

Usage

Simple usage, e.g. mapping strings to true or to other simple values, is straightforward: use the methods put, get, and possibly values.

For a more complex example mapping strings to Sets, see demo.js and demo.html.

Author And License

Copyright 2022 by Chris Palmer, and released under the terms of the Apache license, version 2.0.

About

A generic trie in JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载