Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shgysk8zer0/async-idb
A promise based (async) wrapper for the IndexedDB API
https://github.com/shgysk8zer0/async-idb
Last synced: 26 days ago
JSON representation
A promise based (async) wrapper for the IndexedDB API
- Host: GitHub
- URL: https://github.com/shgysk8zer0/async-idb
- Owner: shgysk8zer0
- License: mit
- Created: 2019-10-21T22:15:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T17:28:03.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T14:41:00.559Z (about 1 month ago)
- Language: JavaScript
- Size: 78.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# async-idb
A promise based (async) wrapper for the IndexedDB API[![Build Status](https://travis-ci.com/shgysk8zer0/async-idb.svg?branch=master)](https://travis-ci.com/shgysk8zer0/async-idb)
[![GitHub license](https://img.shields.io/github/license/shgysk8zer0/async-idb.svg)](https://github.com/shgysk8zer0/async-idb/blob/master/LICENSE)
![GitHub last commit](https://img.shields.io/github/last-commit/shgysk8zer0/async-idb.svg)
![GitHub release](https://img.shields.io/github/release/shgysk8zer0/async-idb.svg)![Keybase PGP](https://img.shields.io/keybase/pgp/shgysk8zer0.svg)
![Keybase BTC](https://img.shields.io/keybase/btc/shgysk8zer0.svg)![GitHub followers](https://img.shields.io/github/followers/shgysk8zer0.svg?style=social)
![GitHub forks](https://img.shields.io/github/forks/shgysk8zer0/async-idb.svg?style=social)
![GitHub stars](https://img.shields.io/github/stars/shgysk8zer0/async-idb.svg?style=social)
![Twitter Follow](https://img.shields.io/twitter/follow/shgysk8zer0.svg?style=social)
- - -## Guides
- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)
- [Contributing](./.github/CONTRIBUTING.md)
- [Security Policy](./.github/SECURITY.md)## Usage
```js
import IDB from '/js/async-idb/IDB.js';try {
const store = await IDB.open('mydb', 1);
const [store1, store2] = store.write('store1', 'store2', /* ... */);
const results = await store1.add(record1, record2, /* ... */); // Uses `Promise.add` internally
await store2.delete('somekey', 'anotherkey', /* ... */);
} catch (err) {
console.error(err);
}```