JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q39070F
  • License MIT

A JSON database module

Package Exports

  • justdata
  • justdata/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (justdata) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JustDB

a JSON database module

Examples

const just = require("justdb")
const db = new just({
    "dbName": "justdb.json", // Our DB file name.
    "dbFolder": "JustBase", // Our DB folder name.
    "language": "en" // You can write "tr" or "en" or "de" or "az" or "ru".
})

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

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