-
Notifications
You must be signed in to change notification settings - Fork 4
config
axios edited this page Sep 21, 2021
·
2 revisions
Get details from the code.
const { Configuration } = require('@axiosleo/cli-tool');
const config = new Configuration({ a: 'A', b: 'B'});
// assign
config.assign({
c: 'C',
x: {
y: {
z: 'Z'
}
}
});
// get
config.get('x.y.z', '<default-value>'); // return default value if the value not exist.
// validate
config.validate('x.y.z'); // single validate
config.validate([ 'x.y.z' ]); // multi validate
// init config
config.init({
a: 'new value A',
b: 'new value B'
});
Anything unclear or inaccurate? Please let me know at [email protected]