An open API service indexing awesome lists of open source software.

https://github.com/xenkys/belin.db

A module for creating a local JSON-based database
https://github.com/xenkys/belin.db

database db json local

Last synced: over 1 year ago
JSON representation

A module for creating a local JSON-based database

Awesome Lists containing this project

README

          

# belin.db

A module for creating a local JSON-based database

## Installation

```
npm install belin.db
```

#### Example

```js
const { Database } = require("belin.db");
const db = new Database("./data.json", {
belowZero: true,
});

db.set("a.b.c", "value"); // { "a": { "b": { "c": "value" }}}
db.get("a"); // { "b": { "c": "value" }}
db.delete("a.b.c"); // { "a": { "b": {}}}
db.has("a.b.c"); // false
db.all(); // { "a": { "b": {}}}
db.clear(); // {}
```