JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q29372F
  • License UNLICENSED

An improved and simple JSON-based database package.

Package Exports

  • wizef-db
  • wizef-db/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wizef-db) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


What is Wizef-DB?

Wizef-DB is a simple and effective JSON-based database package. It offers quick and easy storage for JavaScript applications using JSON format with objects. It’s designed for developers who need a lightweight and reliable data storage option without the hassle of complex database systems.


Installation

To use Wizef-DB in your project, you need to install it via npm:

npm install wizef-db

Or with yarn:

yarn add wizef-db

How to Use

Here’s a quick example of how to use Wizef-DB in your Node.js projects:

const db = require('wizef-db');

// Set a key-value pair

db.set('key', 'value'); // to set data in the database.

// Get a value by key

db.fetch('key'); // to get data by key.

// Delete a key from the database

db.delete('key'); // to delete key from the database.

// Check if a key exists in the database

db.has('key'); // returns "true" or "false".

// Add a number to a key's value

db.add('key', 10); // to add a number to the key's value.

// Subtract a number from a key's value

db.subtract('key', 5); // to subtract a number from the key's value.

// Push a value to an array stored at a key

db.push('key', 10); // to add a value to the end of an array.

// Perform mathematical operations on a key's value

db.math('key', '+', 5); // to perform math operations like addition.

// Fetch a value

db.fetch('key'); // to fetch the data from the database.

// Fetch all data in the database

db.fetchAll(); // to fetch all the data stored in the database.

// Get all data from the database

db.all(); // to get all data in the database.

// Create a backup of the database

db.backup('Filename'); // to create a backup file.

// Reset the entire database

db.reset(); // to delete all data and reset the database.

Features

  • Simple Data Storage: Save and retrieve data with ease using key-value pairs.

  • Backup and Reset: Backup your database and reset it when needed.

  • Math Operations: Perform mathematical operations like addition and subtraction directly on data.

  • Check Existence: Quickly check if a key exists in the database.

  • JSON Format: Data is stored in human-readable JSON format, making it easy to manage outside the application.


Contact

You can reach out to me on Discord: