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

croxydb

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croxydb - npm Package Compare versions

Comparing version 0.0.5 to 0.0.7

file/index.js

5

package.json

@@ -30,3 +30,4 @@ {

"license": "MIT",
"main": "index.js",
"main": "./file/index.js",
"types": "./typings/index.d.ts",
"name": "croxydb",

@@ -37,3 +38,3 @@ "repository": {

},
"version": "0.0.5"
"version": "0.0.7"
}

54

README.md

@@ -9,45 +9,15 @@ # CroxyDB

> JsonDB Example
> Moving Data From Quick.DB
```js
const croxy = require("croxydb")
const adapter = require("croxydb/adapters/jsondb")
const db = new croxy(adapter, {
"dbName": "test", // Our DB file name.
"dbFolder": "database", // Our DB folder name.
"noBlankData": true,
"readable": true,
"language": "en" // You can write "tr" or "en".
})
const db = require("croxydb");
const quickdb = require("quick.db");
db.set("x.y.z", "abc") // abc
db.get("x") // {y: {z: "abc"}}
db.fetch("x") // {y: {z: "abc"}}
db.all() // {x: {y: {z: "abc"}}}
db.push("a", "hello") // ["hello"]
db.push("a", "world") // ["hello", "world"]
db.unpush("a", "hello") // ["world"]
db.push("b", {test: "croxydb"}) // [{test: "croxydb"}]
db.push("b", {test2: "croxydb2"}) // [{test: "croxydb"}, {test2: "croxydb2"}]
db.delByPriority("b", 1) // [{test2: "croxydb"}]
db.setByPriority("b", {newtest:"hey this is edited"}, 1) // [{newtest:"hey this is edited"}]
db.has("x") // true
db.delete("x") // true
db.deleteAll() // true
db.move(quickdb)
```
> YamlDB Example
> Normal Example
```js
const croxy = require("croxydb")
const adapter = require("croxydb/adapters/yamldb")
const db = new croxy(adapter, {
"dbName": "test", // Our DB file name.
"dbFolder": "database", // Our DB folder name.
"language": "en" // You can write "tr" or "en".
})
const db = require("croxydb")

@@ -74,11 +44,9 @@ db.set("x.y.z", "abc") // abc

> LocalStorage Example
> With Options Example
```js
const croxy = require("croxydb")
const adapter = require("croxydb/adapters/localstorage")
const db = new croxy(adapter, {
"dbName": "test", // Our DB file name.
"language": "en" // You can write "tr" or "en".
})
const db = require("croxydb")
db.setReadable(true) // It makes readable your JSON DB file.
db.noBlankData(true) // If you delete anything from object and new object size is less than 1, automaticly removes that object.
db.setAdapter("yamldb") // It makes adapter as written adapter. Default adapter is JsonDB

@@ -85,0 +53,0 @@ db.set("x.y.z", "abc") // abc

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