setuprc
v0.9.9-beta21
Published
setup manager
Downloads
24
Readme
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();