autotree

v0.0.2
A tree-like container which never fails to return a branch

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
npm i autotree

Metadata

  • BSD
  • Whatever
  • Einar Otto Stangvik
  • released 4/24/2015

Downloads

Maintainers