temp db manager

Usage no npm install needed!

<script type="module">
  import temprc from 'https://cdn.skypack.dev/temprc';



Simple temporaly full block data storage for scientific calculation.


    const temprc = new (require('temprc')).base({
        'storage':'storage', // storage file or directory'
        'type':'single', // database type (single or multi) /optional/
        'name':'name' // database name /optional/

    temprc.set('variable', {'test':'test string'}, 'database');

    let data = await temprc.get('variable', 'database');
    //    output : test string

Set variable :

    temprc.set(name, data, 'database');

Get variable :

    let out = await temprc.get(name, 'database');
    // out = value

Check variable existence :

    let out = await temprc.check(name, 'database');
    // out = true or false (boolean)

List all stored variable :

    let out = await temprc.list('database');
    // out = [all variable name] (array)

Get all elements form the db:

    let out = await temprc.all('database');
    // out = object with all element

Remove one element:

   let out = temprc.del(name, database);
   // out = true or false (boolean)

Force data save


Setup autosave (enable/disable)

   temprc.setup('autosave', true || false, 'database');
   // default is : true

Setup hash (enable/disable)

   temprc.setup('hash', true || false, 'database');
   // default is : true