1.3.0 • Published 3 years ago

xenialdb v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Xenialbase db

An open sourced asychronous nodejs module to create json databases

Install

$ npm install xenialdb@latest 

or

$ npm i xenialdb

Example

var xenialdb = require('xenialdb')
var db = new xenialdb('data.json')
db.ready = function(){

/* key1 and key2 is just a unique identifier
same goes with value1 and value2. suppose you declare as 
db.value.rabbit="carrot"
the output would be :~

Data stored!
{ rabbit:'carrot'}

*/
  db.value.key1= "value1"
  db.value.key2="value2"
  
	db.write(function(){
		console.log("Data stored!")
    console.log(db.value);
	})
	
}

expected output

Data stored!
{ hello: 'Hello', world: 'world' }
1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago