keal
v1.2.1
Published
keal is key value storage
Downloads
78
Readme
keal
keal is key value storage
install
npm install keal --save
use
const path = require('path')
const Keal = require('keal');
//initial database folder
const keal = new Keal({
databasePath: path.join(__dirname, 'database'),
databaseName: 'NASA',
});
//put with key value
keal.put('firstName', 'behnam');
keal.put('lastName', 'mohammadi');
keal.put('info', {
age: 28,
height: 175
});
//get
//output: get behnam
keal.get('firstName');
//get
//output: get mohammadi
keal.get('lastName');
//get
//output: get { age: 28, height: 175 }
keal.get('info');
//gets
//output: gets [ 'behnam', 'mohammadi', { age: 28, height: 175 } ]
keal.gets(['firstName', 'lastName', 'info']);
//get all keys
//output: keys [ 'firstName', 'lastName', 'info' ]
keal.keys();
//get all values
//output: values [ 'behnam', 'mohammadi', { age: 28, height: 175 } ]
keal.values();
Node Compatibility Version > 6