introduce

What is Kurimudb

Kurimudb is a progressive Web data warehouse that helps you store your application’s data in Memory or IndexedDB. We keep the syntax simple while providing modularity, subscription data updates, and state management capabilities (such as replacing Vuex).

features

  • The syntax is simple enough ✔️
    • Kurimudb tries to keep the syntax simple, adding, deleting, editing and checking just like working with normal Javascript objects.
  • Read load on demand ✔️
    • Kurimudb only reads data on demand when filtering, so don’t worry about caching huge amounts of data.
  • Data persistence ✔️
    • Kurimudb stores data in IndexedDB so that data is not lost even if the user refreshes.

The installation

npm i kurimudb # or yarn add kurimudb
Copy the code

Rapid experience

For a quick experience, use Kurimudb’s built-in Local and Session objects. Here is an example of adding, deleting, changing, and checking:

import { local, session } from "kurimudb";
// Local is the same as session
// The difference is that local data is stored in IndexedDB.
// Session does not have a cameo appearance, though, and closes the page (ㅂ 'danjun)

// Create or update..
local.data.say = "hello world";

/ / read..
await local.data.say;

/ / delete..
delete local.data.say;

// Determine if there is...
"say" in local.data; // or local.has("say");

// Get all data..
await local.all();
Copy the code

As you can see, Kurimudb’s syntax is simple, just like manipulating a normal Javascript object. However, behind the scenes, your data is already stored in IndexedDB.

Are you ready?

We’ve just covered the core uses of Kurimudb — but these may not be enough for complex applications, so be sure to read the entire tutorial!

Click here to read the full document