Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

darkdb

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darkdb

Database module for json

  • 2.2.1-pre
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

DarkDB

Description

Database module for json

Install

npm i darkdb --save

Example

Setup

const DarkDB = require("darkdb")
const dbOptions = {
    "name": "darkdb",
    "separator": ".",
    "autoFile": true,
    "jsonSpaces":4,
    "language":"en" // tr, en or ru
};
const db = new DarkDB(dbOptions);

Set - Get - Delete

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

Has Check - Get All - Delete All

db.has("x"); // true
db.all(); // {"x": {"y": {}}}
db.deleteAll(); // true

Push - Unpush

db.push("x", "hello") //  ["hello"]
db.push("x", "world") //  ["hello", "world"]
db.unpush("x", "hello") // ["world"]

Add - Remove

db.add("x",10)//10
db.remove("x",1)//9

Keywords

FAQs

Package last updated on 13 Jul 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc