temprc

0.9.9-beta24 • Public • Published

temprc

Simple temporaly full block data storage for scientific calculation.

Example:

    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');
    console.log(data.test);
    //    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

   temprc.save('database');

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

Readme

Keywords

none

Package Sidebar

Install

npm i temprc

Weekly Downloads

22

Version

0.9.9-beta24

License

GPL-3.0-or-later

Unpacked Size

37.9 kB

Total Files

11

Last publish

Collaborators

  • soldy