autotree
v0.0.2
Published
A tree-like container which never fails to return a branch
Downloads
3
Readme
autotree
A tree-like container which never fails to return a branch.
Usage
var AutoTree = require('autotree');
var tree = new AutoTree();
tree.get(['foo', 'bar', 'baz']).push(1, 2, 3);
console.log(tree.get(['foo', 'bar', 'baz']));
// => [1, 2, 3]
tree.get(['foo', 'bar', 'baz']).splice(0, 3);
tree.trim(['foo', 'bar', 'baz']); // <= since the array is now empty, this will free up any used memory