2.0.2 • Published 5 years ago

@diam/json-db v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Simple JSON DB

Install (via npm)

npm install --save @diam/json-db

Usage

Simply writes json to a file.

var db = new JsonDB('./file.json');

db.write({ message: 'whatever you want' }, function (err) {
	db.read(function (err, val) {
		// val = { message: 'whatever you want' }
	})
})

It can also be done synchronously, like so:

var db = new JsonDB('./file.json');

db.writeSync({ message: 'whatever you want' })
var val = db.readSync()
// val = { message: 'whatever you want' }

Contributions welcome!

Credits

This library was initially made by the awesome team of engineers at Diamond.

If you haven't already, make sure you install Diamond!

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago