@nightmaregaurav/indexdbwrapper
v1.0.5
Published
IndexDBWrapper is a library that allows you to interact with the IndexedDB API in a relational way. It is not an ORM. It only provides simple CRUD methods to interact with the IndexedDB API.
Downloads
13
Maintainers
Readme
IndexDBWrapper
Description
IndexDBWrapper is a library that allows you to interact with the IndexedDB API. It is not an ORM. It only provides simple CRD methods to interact with the IndexedDB API.
Installation
npm install @nightmaregaurav/indexdbwrapper
Usage
Creating a Database
import {IndexDBWrapper} from "@nightmaregaurav/indexdbwrapper";
const db = new IndexDBWrapper("test_database", 1);
Store a Value
await db.Set("key", {prop1: 1, prop2: "2", prop3: new Date()});
Retrieve a Value
const value = await db.Get("key");
console.log(value);
Delete a Value
await db.Delete("key");
How to Contribute
- Fork the repository
- Clone the forked repository
- Make changes
- Commit and push the changes
- Create a pull request
- Wait for the pull request to be merged
- Celebrate
- Repeat
If you are new to open source, you can read this to learn how to contribute to open source projects. If you are new to GitHub, you can read this to learn how to use GitHub. If you are new to Git, you can read this to learn how to use Git. If you are new to TypeScript, you can read this to learn how to use TypeScript.
License
IndexDBWrapper is released under the MIT License. You can find the full license details in the LICENSE file.
Made with ❤️ by NightmareGaurav.