almacen
v0.2.0
Published
Easy to use library to work with localStorage and sessionStorage
Downloads
5
Maintainers
Readme
Almacen
How to use it
Using browserify it's easy to use it.
var almacen = require("almacen");
almacen.local.set("hello","world!");
almacen.session.set("foo","bar");
almacen.session.get("foo") === "bar"; // true
almacen.local.set("object", {
"a": [
"b": 1
]
});
almacen.local.get("object")
But this works too with RequireJS.
define(["almacen"], function(almacen) {
almacen.local.set("hello","world");
});
or even directly in the browser.
<script src="almacen.js"></script>
<script>
almacen.local.set("hello","world");
</script>
Made with ❤ by ROJO 2 (http://rojo2.com)