simple-indexeddb
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

simple-indexedDB

Api for doing simple and intuitive operations towards indexedDB.

Installation

yarn add simple-indexeddb

npm install simple-indexeddb

import {createStore, put, remove} from 'simple-indexeddb'; 

Creating the database

    createStore("myDatabase", "myStore");

Adding/Replacing items

    // adding (specifying path to key, 'id')
    put("myDatabase", "myStore", {id : 1, text : "buy milk", done : false}, "id");  

    // replacing (same key!)
    put("myDatabase", "myStore", {id : 1, text : "walk the dog", done : false}, "id"); 

Removing items

        // same key as earlier 
    remove(1, "myStore", "myDatabase"); 

Readme

Keywords

none

Package Sidebar

Install

npm i simple-indexeddb

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

9.15 kB

Total Files

6

Last publish

Collaborators

  • olaven