JSPM

global.db

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5
    • Score
      100M100P100Q26682F
    • License MIT

    An easy to use local json database.

    Package Exports

    • global.db

    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 (global.db) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    GlobalDB

    Global Database is an easy to use local database. No setup needed, data is stored in your local storage in a json file. GlobalDB is designed similar to NoSQL database.

    Features

    • NO setup needed.
    • Designed similar to NoSQL database.
    • Easy to use for beginners.
    • Stored locally.

    How to use

    You don't need to setup the database, no key or code needed. ALL data are stored in your local storage.

    const GlobalDB = require("global.db")
    const db = new GlobalDB({ path: "./database/userID.json" });
    
    // Set a value to the specified key. Result : { economy: { money: 10000, bank: 5000 } }
    db.set("economy",  { money: 10000, bank: 5000 });
    
    // This will check if economy exists or not. Result : true
    db.has("economy");
    
    // Get data from the economy key. Result : { money: 10000, bank: 5000 }
    db.get("economy");
    
    // Delete a key from the database. Result: {}
    db.delete("economy")

    Installation

    1. Install node.js and npm.
    2. Go to your project directory.
    3. Run npm install global.db

    Changelogs

    v1.0.0

    Added all main features