🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

aquadb

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aquadb

A fast and simple database handler for Browser and Node.

0.0.4
latest
Source
npm
Version published
Weekly downloads
82
34.43%
Maintainers
1
Weekly downloads
 
Created
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

db

FAQs

Package last updated on 10 Jul 2020

Did you know?

Socket

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