Package Exports
- kauadb
- kauadb/kauadb.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 (kauadb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
KauaDB
Another simple JSON database
Example:
const KauaDB = require('kauadb')
const db = new KauaDB('./file.json') // The file should exists to work
// Methods
db.set("test", "wow") // { "test": "wow" }
db.get("test") // wow
db.delete("test") // {}
db.set("test", []) // { "test": [] }
db.add("test", 10) // { "test": [ 10 ] }
db.add("test", 100) // { "test": [ 10, 100 ] }
db.remove("test", 100) // { "test": [ 10 ] }
db.delete("test") // {}
db.set("test.another", { thing: { what: 1 }, thing2: { what: 2 } })
// { "another": { "thing": { "what": 1 }, "thing2": { "what": 2 } } }
db.array("test.another")
// [ { "what": 1 }, { "what": 2 } ]