autotree

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i autotree

Weekly Downloads

1

Version

0.0.2

License

BSD

Last publish

Collaborators

  • einaros