0.9.9-beta21 • Published 2 years ago

setuprc v0.9.9-beta21

Weekly downloads
24
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

About

The SetuprRC is a hard typed setup object holder. Nothing more.

init

const setup = new  (require('setuprc')).base({
    'testString':{ // setup option
        'type'    : 'string', //  typeHardening type 
        'default' : 'value'   // default value
       // ... optional typehardening limiters
    },
    'testList':{
        'type'    : 'list',
        'list'    : ['tarray','parray','give','me','blue','bird','6array','7array'],
        'default' : ['tarray','parray']
    }
});

basic usage

Set a value

setup.set(
    'testString',
    'new value'
);

// return with boolean true or false

Get a value

setup.get(
    'testString'
);

// return  with the setting option.

all value

setup.all();

// return  fill setup option

Reset all value to default

setup.reset();