storage.js compatible with isomorphic apps.
storage.js compatible with isomorphic apps.
``html`
`js
$storage.on('time', function (e) {
console.log('time changed', e)
})
setInterval(function () {
$storage.set('time', (new Date()).getTime());
}, 50)
``
- set(key:String, value:Any)
- get(key:String)
- remove(key:String)
- clear()
- on(key:String, fn:Function)
- off(key:String, fn:Function)