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

zacron.db

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zacron.db

A JSON Database Module | JSON Veritabanı Modülü

  • 5.1.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

zacron.db

A JSON Database Module

npm install zacron.db
  • EN | zacron.db is easy to use, useful, new and faster Json based database module.

Releases (v5.1.0)

Set Data With Using APIs.

If you want to save a data from API, there is an easy method for this. Use ".setFromAPI()" for save data from API. Example:

zdb.setFromAPI("https://api.example.com/data", "test_data", { headers: {...} });
// First parameter: Request URL
// Second parameter: Data Name
// (OPTIONAL) Third parameter: Request Options

Auto Open Database File

Database file is now opening automaticly! You must only enter file name.

Definition

There are 3 different definitions:

// Default
const { Database } = require("zacron.db");
const zdb = new Database("<DatabaseFileName>")

// ES6 import
import { Database } from "zacron.db";
const zdb = new Database("<DatabaseFileName>")

Note:

Database File Name Is Optional. If Filename Is Not Specified, Default Filename Is Will Be "database.json". If You Specify A File Name, You Must Open File Manually.

Examples

For Set A Data To Database:

const { Database } = require("zacron.db");
const zdb = new Database("<DatabaseFileName>")

zdb.set("data", "value")

For Fetch A Data From Database:

const { Database } = require("zacron.db");
const zdb = new Database("<DatabaseFileName>")

// zdb.set("data_name", "zacron")

console.log(zdb.fetch("data_name")) //Output: 'zacron'

Methods

Set A Data:

set("data", "value")
save("data", "value")
setFromAPI("reqURL", "data_name", {})

Fetch A Data:

get("data")
fetch("data")

Math:

add("data", number) - Addition
subtract("data", number) - Subtraction
multiply("data", number) - Multiplication
divide("data", number) - Division

Delete A Data - All Datas - Backup Database:

delete("data")

all(limit) - Limit Is Optional.

backup("backup_file_name")

Delete All Datas - Delete Database File:

deleteAll()
clear()

destroy()

Type of Value of Data Name - Push Value To Array - Delete Value From Array:

type("data")

push("data", "value")

pull("data", "value")


Discord Server

Keywords

FAQs

Package last updated on 06 Dec 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