0.0.2 • Published 4 years ago

modloffdb v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

modloffdb

npm i modloffdb

Examples

const MODLOFF = require("modloffdb")
const db = new MODLOFF({
    "dbName": "test", // Our DB file name.
    "dbFolder": "database", // Our DB folder name.
    "noBlankData": true,
    "readable": true,
    "language": "en" // You can write "tr" or "en".
})

db.set("x.y.z", "abc") // abc

db.get("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: "modloffdb"}) // [{test: "modloffdb"}]
db.push("b", {test2: "modloffdb2"}) // [{test: "modloffdb"}, {test2: "modloffdb2"}]
db.delByPriority("b", 1) // [{test2: "modloffdb"}]
db.setByPriority("b", {newtest:"hey this is edited"} 1) // [{newtest:"hey this is edited"}]

db.delete("x") // true
db.deleteAll() // true
0.0.2

4 years ago

0.0.1

4 years ago