0.0.1001 • Published 7 years ago

tixfactory.storage v0.0.1001

Weekly downloads
7
License
-
Repository
github
Last release
7 years ago

TixFactory.Storage

Introduction

TODO

Example

var storage = require("tixfactory.storage");

var localStorage = new storage.localStorage("./localStorage");
localStorage.on("set", function(key, value){
	console.log("localStorage set:", key, value);
}).on("remove", function(key, value){
	console.log("localStorage removed:", key, value);
});

var sessionStorage = new storage.sessionStorage();
sessionStorage.on("set", function(key, value){
	console.log("localStorage set:", key, value);
}).on("remove", function(key, value){
	console.log("localStorage removed:", key, value);
});

localStorage.setItem("hello", "world");
sessionStorage.setItem("hello", "world");
localStorage.removeItem("hello");
sessionStorage.removeItem("hello");