Installation:
npm install kaitodb
Basic Usage:
const KaitoDB = require('kaitodb');
const MyDb = new KaitoDB('test_db');
console.log(MyDb.version);
console.log(MyDb.name);
console.log(MyDb.path);
console.log(MyDb.get('test_key_string'));
MyDb.set('test_key_string', 'test_value');
console.log(MyDb.get('test_key_string'));
console.log(MyDb.get('test_key_number'));
MyDb.set('test_key_number', 5);
console.log(MyDb.get('test_key_number'));
console.log(MyDb.get('test_key_boolean'));
MyDb.set('test_key_boolean', true);
console.log(MyDb.get('test_key_boolean'));
console.log(MyDb.get('test_key_null'));
MyDb.set('test_key_null', null);
console.log(MyDb.get('test_key_null'));
console.log(MyDb.get('test_key_array'));
MyDb.set('test_key_array', ["test_value", 5, true, null]);
console.log(MyDb.get('test_key_array'));
console.log(MyDb.all());
MyDb.refresh();
console.log(MyDb.all());
Documentation:
<kaitodb>
will be count as MyDb
in the Basic Usage code.
<kaitodb>.version
<kaitodb>.name
<kaitodb>.path
<kaitodb>.get(key)
value placement: <key>
= the name of the value that will be catched from the database(type: string)
<kaitodb>.set(key, value)
type: function(returns: number(returning 0
means completed unsuccessfully and 1
means completed successfully))
value placement: <key>
= the name of the value that will be catched from the database(type: string) <value>
= the key that will be the value of the <key>
in database(type: string || number || array || boolean || null(it count as empty string))
<kaitodb>.refresh()
<kaitodb>.all()
Future Ideas:
.env
formated database:
the idea is to make a db using env file format to store data to make it secure with the public file hosts
non-node
support
a kaitodb module alternative that can be used with <script>
tag that not requires node
- alternative language support
making kaitodb more popular by making a module for other languages too but sadly by far the most hard one to become real but if it will be then probably will be c#
(.cs
) or python
(.py
) because the usage popularity
Credits:
Only me kaito_turkish_boi for now.
