Micro-library to make operating on tree structures stored in local storage dead simple.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client
src
LICENSE
README.md

README.md

easierStorage

easierStorage makes it dead simple to work with tree structures that are stored in localStorage.

Examples

// Write an item 3 levels deep without ever checking whether top or middle
// exist.  calling setItem like this will automatically create any nodes that
// are needed.
easierStorage.setItem("top", "middle", "leaf", "oooh!");

// Write into a new branch off of the top, this will not destroy the middle
// branch.
easierStorage.setItem("top", "right", "end", "wee!");

// Go directly to the item you want to get, without checking whether top or
// middle exist. Returns undefined if any nodes do not exist.
var leafValue = easierStorage.getItem("top", "middle", "leaf");
// leafValue === "oooh!"


License:

Mozilla MPL 2.0

Author