2.0.0 • Published 5 years ago

idb-kvs v2.0.0

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
5 years ago

idb-kvs

a fork of an old version of jakearchibald/idb-keyval that uses callbacks instead of promises

Install

npm install michaelrhodes/idb-kvs

Usage

kvs.set('hello', 'world')
kvs.set('foo', 'bar')

// Since this is IDB-backed, you can store
// anything structured/clonable (numbers,
// arrays, objects, dates, blobs etc)

kvs.set('hello', { person: 'newman' }, function (err, key) {
  console.log(err ? 'It failed!' : 'It worked!')
})

kvs.get('hello', function (err, val) {
  console.log(val)
  => { person: 'newman' }
})

kvs.remove('hello')
kvs.clear()
2.0.0

5 years ago

1.0.0

7 years ago