dexbee

0.1.6 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i dexbee

Homepage

dexbee.io

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

24.4 kB

Total Files

5

Last publish

Collaborators

  • broadwayinc