Socket
Socket
Sign inDemoInstall

aquadb

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aquadb

A fast and simple database handler for Browser and Node.


Version published
Weekly downloads
53
increased by35.9%
Maintainers
1
Install size
158 kB
Created
Weekly downloads
 

Readme

Source

AquaDB

Codacy Badge All Contributors NPM Downloads

A fast and simple database handler for Browser and Node.

Installation

NPM

npm install aquadb

YARN

yarn add aquadb

Wiki

You can go here by clicking.

Basic Usages

Node Usage

const AquaDB = require("aquadb");
const Adapter = require("aquadb/adapters/JsonDB", {
  "name": "crazy-database",
  "separator": ".",
  "autoFile": true,
  "ignoreWarns": false
});
const db = new AquaDB(Adapter);

db.on("data", (packet) => {
    console.log(packet);
});

db.set("x.y.z", "test"); // {"x": {"y": {"z": "test"}}}
db.get("x"); // {"y": {"z": "test"}}
db.has("x"); // true
db.delete("x.y.z"); // true
db.all(); // {"x": {"y": {}}}
db.deleteAll(); // true

Browser Usage

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/aquadb/dist/AquaDB.js"></script>
    <script src="https://unpkg.com/aquadb/dist/LocalStorage.js"></script>
    <title>AquaDB</title>
  </head>
  <body>
    <script>
        const db = new AquaDB(LocalStorage, {
          "name": "crazy-database",
          "separator": "."
        });

        db.on("data", (packet) => {
            console.log(packet);
        });

        db.set("x.y.z", "test"); // {"x": {"y": {"z": "test"}}}
        db.get("x"); // {"y": {"z": "test"}}
        db.has("x"); // true
        db.delete("x.y.z"); // true
        db.all(); // {"x": {"y": {}}}
        db.deleteAll(); // true
    </script>
  </body>
</html>

Click here for more features.

Adapters

Node

JsonDB | BsonDB | YamlDB

Browser

LocalStorage

Contributors


Ceyhun

💻 📖 🤔 📆 ⚠️

If you want to help, you can open a issue.

Keywords

FAQs

Last updated on 10 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc