Skip to content

πŸ’Ž Micro JavaScript Library for implementation local πŸ’Ύ Database IndexedDB that is durable and scalable.

License

Notifications You must be signed in to change notification settings

JoseJPR/micro-indexeddb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Micro IndexedDB



πŸ”– Description

πŸ’Ž Micro JavaScript Library for implementation local πŸ’Ύ Database IndexedDB that is durable and scalable. Include this library into your native JavaScript application with embed script type module or your React, Angular and others frameworks with npm module.

πŸ“ How to work with this project

Native JavaScript

Copy "index.js" file into the main folder of your JavaScript application and import it with a simple script reference into other js file, for example "db.js".

import Db from "./index.js";

NPM

npm i micro-indexeddb
import Db from "micro-indexeddb";

Run

// Define and init Database
Db.init("myDB", 1, [{
  name: "Article",
  details: {
    keyPath: "id"
  }
}]);

// Save data into Database
const id = await Db.add("Article", {
  "id": Date.now(),
  "title": "Hello World V.1"
});

// Get all data from registered
const result = await Db.findById("Article", id);

// Update data with keypath
await Db.put("Article", {
  "id": id,
  "title": "Hello World V.2"
});

// Remove data with keypath
await Db.delete("Article", id);

πŸ“‚ Code Scaffolding

/
β”œβ”€β”€ assets 🌈                   # Images Sources.
β”œβ”€β”€ src πŸ“¦                      # Main file library.
|   └── ...
└── ...

⛽️ Review and Update Sependencies

For review and update all npm dependencies of this project you need install in global npm package "npm-check-updates" npm module.

# Install and Run
$npm i -g npm-check-updates
$ncu

License

MIT

Happy Code

Created with JavaScript, lot of ❀️ and a few β˜•οΈ

This README.md file has been written keeping in mind

GitHub Markdown
Emoji Cheat Sheet

About

πŸ’Ž Micro JavaScript Library for implementation local πŸ’Ύ Database IndexedDB that is durable and scalable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published