@dlghq/indexed-db

0.1.0 • Public • Published

Indexed DB

IndexedDB wrapper for dialog projects

Installation

yarn add @dlghq/indexed-db

or

npm install @dlghq/indexed-db

Usage

import Database, { type IDBDatabase } from '@dlghq/indexed-db';

const db = new Database({
  name: 'dialog',
  version: 1,
  onUpgrade(db: IDBDatabase, oldVersion: number, newVersion: ?number) {
    
  }
});

db.read(['users'], (trx) => {
  const users = trx.getStore('users');
  
  return users.get(123);
}).then((user) => {
  console.log(user);
});

License

Apache-2.0

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @dlghq/indexed-db

    Weekly Downloads

    0

    Version

    0.1.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • timurkhabibullin