coladb
A small library for using IndexedDB
in Promise
style. Wrap IDBRequest
to Promise
.
Installation
npm i coladb --save
Usage
Use as module:
Use as script in html file. Import dist/coladb.js
to your project, export as global variable named colaDB
:
API
Contrast to native IndexedDB
, the open
method signature has a little different.
coladb.open(name: string, version?: number, onupgradeneeded?: onupgradeneededFn, onblocked?: onblockedFn)
Examples
Cursor
:
Use cursor = await cursor.continue8 console.log`key: , value: `
More example in test directory
.
Development
dist
npm run dist
Lint
npm run lint
Test
npm run karma:startnpm run karma:run