Comparing version 0.0.5 to 0.0.7
@@ -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" | ||
} |
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
2
32461
12
970
72
8