This package has been deprecated

Author message:

please use @surfingpikachu/local-database

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"
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i rf-ez-database

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

3.83 kB

Total Files

6

Last publish

Collaborators

  • surfingpikachu