udhcpd.js
function expand_r(options, lines, prefix) {
  Object.getOwnPropertyNames(options).forEach(function(key) {
    var full = prefix.concat(key);
    var value = options[key];

    if (Array.isArray(value)) {
      value.forEach(function(val) {
        lines.push(full.concat(val).join(' '));
      });      
    }
    else if (typeof(value) == 'object') {
      expand_r(value, lines, full);
    }
    else {
      lines.push(full.concat(value).join(' '));
    }
  });
}
function expand_r(options, lines, prefix) {
  Object.getOwnPropertyNames(options).forEach(function(key) {
    var full = prefix.concat(key);
    var value = options[key];

    if (Array.isArray(value)) {
      value.forEach(function(val) {
        lines.push(full.concat(val).join(' '));
      });      
    }
    else if (typeof(value) == 'object') {
      expand_r(value, lines, full);
    }
    else {
      lines.push(full.concat(value).join(' '));
    }
  });
}
Recursively expand `options` into `lines` with a `prefix`.

@private
@static
@category udhcpd
@param {object} options The dhcp server configuration.
@param {array} lines The lines of the configuration file.
@param {array) prefix The key prefix.