2.2.0 • Published 9 months ago

vk-bridge-level v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Level abstraction for VK Bridge

level badge npm

Use it for easy for getting access to easy database interface around VK Bridge Storage

Install

NPM

npm i vk-bridge-level

Yarn

yarn add vk-bridge-level

Usage

API Reference

Example

import {VkBridgeLevel} from 'vk-bridge-level'
import bridge from '@vkontakte/vk-bridge';

const db = new VkBridgeLevel(bridge, {valueEncoding: 'json'}) // valueEncoding will auto encode and decode your objects to json
const key = 'key'
const value = {test: 'test'} // object to store
await db.put(key, value)
await db.get(key).then(console.log) // will return value from storage
await db.iterator().next().then(console.log) // will return
2.2.0

9 months ago

2.1.1

9 months ago

2.1.0

9 months ago

2.0.0

9 months ago

1.2.0

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.0

9 months ago