2.0.0 • Published 2 years ago

orbit-db-kvstore v2.0.0

Weekly downloads
1,201
License
MIT
Repository
github
Last release
2 years ago

orbit-db-kvstore

Gitter Matrix npm version

Key-Value database for orbit-db

A key-value database just like your favourite key-value database.

Used in orbit-db.

Table of Contents

Install

npm install orbit-db ipfs

Usage

First, create an instance of OrbitDB:

import * as IPFS from 'ipfs'
import OrbitDB from 'orbit-db'

const ipfs = new IPFS()
const orbitdb = await OrbitDB.createInstance(ipfs)

Get a key-value database and add an entry to it:

const kv = await orbitdb.kvstore('settings')
kv.put('volume', '100')
  .then(() => {
    console.log(kv.get('volume'))
    // 100
  })

Later, when the database contains data, load the history and query when ready:

const kv = await orbitdb.kvstore('settings')
kv.events.on('ready', () => {
  console.log(kv.get('volume'))
  // 100
})

API

See orbit-db's API Documentation for full details.

Contributing

If you think this could be better, please open an issue!

Please note that all interactions in @orbitdb fall under our Code of Conduct.

License

MIT ©️ 2016-2018 Protocol Labs Inc., 2018 Haja Networks Oy

2.0.0

2 years ago

2.0.1-bfda8eb.0

2 years ago

1.12.1-e4eee56.0

2 years ago

1.12.0

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

6 years ago

1.6.0

6 years ago

1.6.0-rc1

6 years ago

1.5.1

6 years ago

1.4.1

6 years ago

1.5.0

6 years ago

1.5.0-rc4

6 years ago

1.5.0-rc3

6 years ago

1.5.0-rc.3

6 years ago

1.5.0-rc2

6 years ago

1.5.0-rc.1

6 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.2.0

8 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago