Skip to content
/ ds-trie Public

Dead-simple trie data structure in JavaScript

Notifications You must be signed in to change notification settings

kendru/ds-trie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ds-trie

A dead-simple trie data structure for JavaScript

Usage:

const Trie = require('ds-trie');
const assert = require('assert');

const t = new Trie();

t.addElement(['path', 'a'], 'something');
t.addElements(['path', 'b'], ['other', 'stuff']);
t.removeElement(['path', 'b'], 'other');

t.addElement(['path'], 'root');

assert.deepStrictEqual(t.collect(['path', 'b']), ['stuff', 'root']);

About

Dead-simple trie data structure in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published