Config.findProgramdata Async

Config.findProgramdata().then(function(buf) {
  // Use buf
});
Returns  
Buf  

Config.openDefault Async

Config.openDefault().then(function(config) {
  // Use config
});
Returns  
Config  

Config#getStringBuf Async

config.getStringBuf(name).then(function(buf) {
  // Use buf
});
Parameters Type  
name String the variable’s name
Returns  
Buf buffer in which to store the string

Config#lock Sync

var result = config.lock(tx);
Parameters Type  
tx Transaction the resulting transaction, use this to commit or undo the changes
Returns  
Number 0 or an error code

Config#setInt64 Sync

var result = config.setInt64(name, value);
Parameters Type  
name String the variable’s name
value Number Long integer value for the variable
Returns  
Number 0 or an error code

Config#setMultivar Sync

var result = config.setMultivar(name, regexp, value);
Parameters Type  
name String the variable’s name
regexp String a regular expression to indicate which values to replace
value String the new value.
Returns  
Number  

Config#setString Async

config.setString(name, value).then(function(result) {
  // Use result
});
Parameters Type  
name String the variable’s name
value String the string to store.
Returns  
Number 0 or an error code

Config#snapshot Async

config.snapshot().then(function(config) {
  // Use config
});
Returns  
Config  

Config.LEVEL ENUM

Flag Value
Config.LEVEL.PROGRAMDATA 1
Config.LEVEL.SYSTEM 2
Config.LEVEL.XDG 3
Config.LEVEL.GLOBAL 4
Config.LEVEL.LOCAL 5
Config.LEVEL.APP 6
Config.LEVEL.HIGHEST_LEVEL -1