storage-js-iso
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

storage-js-iso

storage.js compatible with isomorphic apps.

How to use

<script src="https://unpkg.com/storage-js-iso@0.2.0/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)

Dependents (12)

Package Sidebar

Install

npm i storage-js-iso

Weekly Downloads

6

Version

0.2.2

License

MIT

Unpacked Size

13.1 kB

Total Files

12

Last publish

Collaborators

  • wangdahoo