Socket
Socket
Sign inDemoInstall

baylitdb

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    baylitdb

BaylitDB (JSON)


Version published
Maintainers
1
Install size
4.77 kB
Created

Readme

Source

BaylitDB

BaylitDB is JSON database system.

Installation

npm install baylitdb

Usage

const baylit = require("baylitdb");
const db = new baylit({ dbFolder: "DB", dbName: "baylit" });

//Set any string or number in database.
db.set("baylit", "database"); // true

// Get database element from id.
db.get("baylit"); // database

//Add number.
db.add("number", 1); // 1
//Substract number.
db.subtract("number", 1); // 0

//Push element into the array.
db.push("array", 1); // [1]
//Unpush element from array.
db.unpush("array", 1); // []

//Asset control.
db.has("baylit"); // true

//Get all database element.
db.all(); // {baylit : "database", number: 1, array: []}

//Delete one element.
db.delete("baylit"); // true
//Delete all element.
db.deleteAll(); // true

//Get element value type.
db.type("baylit"); //String

Extra
db.set("baylit.db", "json"); // {baylit : {db: "json"} }

Discord: Yiit#9184

License

MIT

Keywords

FAQs

Last updated on 25 Nov 2021

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