0.1.6 • Published 11 months ago

dexbee v0.1.6

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

DexBee

DexBee is a simple lightweight indexedDB framework for easy setup and indexing.

Installation

CDN

Add script tag inside <head></head>

<script src="https://cdn.jsdelivr.net/npm/dexbee@latest/dist/dexbee.js"></script>

Webpack

npm i dexbee

And in your javascript:

import DexBee from 'dexbee';

Basic usage

async function main() {
    let data = [{id: 1, name: 'Tom'}, {id: 2, name: 'Jerry'}];

    // Setup database:
    let db = new DexBee({Cartoon: {TomNJerry: {uniqueKey: 'id', index: 'name'}}});

    // Write to database:
    await db.put('Cartoon', 'TomNJerry', data);

    // Get data:
    let jerry = await db.get('Cartoon', 'TomNJerry', {
        where: {name: 'Jerry'}
    });

    console.log(jerry); // logs [ [{ id: 2, name: 'Jerry'}] ]
}

main();

Documentation

Check out Getting Started tutorial from our website dexbee.io

Issues

Post bugs and feature requests Here. Any Contributions are welcomed :)

License

MIT License. Copyright (c) 2021-present, broadway Inc.

0.1.4

11 months ago

0.1.6

11 months ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago