0.0.2 • Published 9 years ago

autotree v0.0.2

Weekly downloads
-
License
BSD
Repository
-
Last release
9 years ago

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