idb-kvs

2.0.0 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i idb-kvs

Weekly Downloads

1

Version

2.0.0

License

Apache-2.0

Unpacked Size

3.86 kB

Total Files

6

Last publish

Collaborators

  • michaelrhodes