1.0.2 • Published 8 months ago

disbone.db v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

disbone.db

A simple, lightweight, and versatile JSON-based database for Node.js, proudly brought to you by disbone Studio. disbone.db is designed for small to medium-scale projects requiring a straightforward, file-based database solution with an emphasis on ease of use and minimal setup.

Features

  • Lightweight & Fast : Quick to set up and requires minimal dependencies.
  • Easy to Use : Intuitive API for CRUD operations.
  • Flexible : Works well for a wide range of JavaScript and Node.js projects.
  • No External Database Management : No need to manage a separate database server.
  • Open Source : Feel free to contribute, fork, or suggest improvements!

Installation

Install disbone.db using npm :

npm install disbone.db

Or using yarn :

yarn add disbone.db

Quick Start

const disbonedb = require('disbone.db');
const db = new disbonedb('./disbone.json');

async function demo() {
    // Setting a value
    await db.set('hello', 'world');
    console.log('Value set!');

    // Getting a value
    const value = await db.get('hello');
    console.log('Got value:', value);

    // Deleting a value
    await db.delete('hello');
    console.log('Value deleted');

    // Getting all entries
    const allEntries = await db.all();
    console.log(allEntries);

    // Clearing the database
    await db.clear();
    console.log('Database cleared');
}

demo();

API Reference

  • set(key, value) : Sets a value for a given key.
  • get(key) : Retrieves a value by key.
  • delete(key) : Deletes a key-value pair by key.
  • all() : Returns all entries in the database.
  • clear() : Clears the database.
  • update(key, value) : Updates the value for a given key.

Contributing

We welcome contributions to disbone.db! Whether it's submitting bugs, requesting features, or submitting your own code changes, all through GitHub :

Join Our Community

Have questions, suggestions, or want to discuss disbone.db and other projects? Join us on Discord : discord.gg/disbone

License

disbone.db is MIT licensed. See the LICENSE file for more details.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago