storage-js-iso
v0.2.2
Published
storage.js compatible with isomorphic apps.
Downloads
18
Readme
storage-js-iso
storage.js compatible with isomorphic apps.
How to use
<script src="https://unpkg.com/[email protected]/dist/storage.min.js"></script>
$storage.on('time', function (e) {
console.log('time changed', e)
})
setInterval(function () {
$storage.set('time', (new Date()).getTime());
}, 50)
API
- set(key:String, value:Any)
- get(key:String)
- remove(key:String)
- clear()
- on(key:String, fn:Function)
- off(key:String, fn:Function)