Socket
Socket
Sign inDemoInstall

wio.db

Package Overview
Dependencies
2
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wio.db

Gözle okunabilir database modülü.


Version published
Weekly downloads
2.8K
decreased by-44.04%
Maintainers
1
Install size
1.82 MB
Created
Weekly downloads
 

Readme

Source

Image Image


Yüklemek İçin

npm install  wio.db

Uyarı || Warning

  • Node sürümü 12'den büyük olması gerekli gereklidir.
  • Node version must be greater than 12.

Change Log

  • Removed
    • <db>.arrayHasValue method.
    • JsonDatabase.DBCollection prop. (static)
    • <db>.totalDBSize prop.
  • Added
    • <db>.filter method.
    • <db>.info prop.
    • Options -> maxDataSize
      • Data limit added.
  • Updated
    • <db>.findAndDelete method.

Some bug fixed and performance improved.

Speed test

Speed

Nasıl Kullanılır? || how to use?

JS

const {
    JsonDatabase,
    YamlDatabase
} = require("wio.db");

const db = new JsonDatabase({
  databasePath:"./databases/myJsonDatabase.json"
});

const yamldb = new YamlDatabase({
  databasePath: "./databases/myYamlDatabase.yml"
});

// Data set | get
db.set("test", 1);
db.get("test");
db.fetch("test");

// Data exists

db.has("test");
db.exists("test");

// Get all data

db.all(5); || db.all();
db.fetchAll(5); || db.fetchAll();

// To JSON

db.toJson(5); || db.toJson();

// Delete data

db.delete("test");
db.deleteAll();
db.findAndDelete((element,db) => {
    return element.ID.includes("test");
});

// Get data type

db.type("test"); // ---> number

// DB Array methods
db.push("testArray", 10);
db.pull("testArray", (element, index, array) => element < 10, true); // Multiple options = true. (default false)
db.valueArray();
db.keyArray();

// DB Math metods

db.math("test","*", 3);
db.add("test", 10);
db.substr("test", 5);

// DB Finding methods

db.includes("tes");
db.startsWith("t");

// Infos
console.log(db.size);
console.log(db.info);

// Destroy DB
db.destroy();

Bana ulaşabileceğiniz yerler. || Bugs report

İnstagram Discord

Keywords

FAQs

Last updated on 27 Dec 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