Notoriously Psychedelic Modules
Miss any of our Open RFC calls?Watch the recordings here! »

rf-ez-database

1.0.3 • Public • Published

rf-ez-database

a simple JSON database tool based on data-store

 
const Database = new Database("./testdb.json")
 
const db = new Database({
    name: "testdb",
    path: "./testdb.json",
    log: false
})
 
db.name().then(console.log)
// testdb
db.set("hello", "world").then(console.log)
// world
db.get("hello").then(console.log)
// world
db.has("hello").then(console.log)
// true
db.add("testArray", "item1").then(console.log)
// [ "item1" ]
db.clear("testArray").then(console.log)

./testdb.json:

{
  "__name": "test db",
  "hello": "world",
  "testArray": [
    "item1"
  ]
}

Keywords

none

Install

npm i rf-ez-database

DownloadsWeekly Downloads

5

Version

1.0.3

License

ISC

Unpacked Size

3.83 kB

Total Files

6

Last publish

Collaborators

  • avatar