index.js
function build(base, config) {
  var result = resolver(base);
  Object.keys(config).forEach(function (key) {
    var value = config[key];
    if (typeof value === "string") {
      result[key] = resolver(result(value, true));
    } else if (Array.isArray(value) && value.length === 2 &&
        typeof value[0] === "string" &&  typeof value[1] === "object") {
      result[key] = build(result(value[0], true), value[1]);
    } else {
      throw new TypeError("Invalid value at: " + key);
    }
  });
  return result;
}
function build(base, config) {
  var result = resolver(base);
  Object.keys(config).forEach(function (key) {
    var value = config[key];
    if (typeof value === "string") {
      result[key] = resolver(result(value, true));
    } else if (Array.isArray(value) && value.length === 2 &&
        typeof value[0] === "string" &&  typeof value[1] === "object") {
      result[key] = build(result(value[0], true), value[1]);
    } else {
      throw new TypeError("Invalid value at: " + key);
    }
  });
  return result;
}
function build ( base , config ) { var result = resolver ( base ) ; Object . keys ( config ) . forEach ( function ( key ) { var value = config [ key ] ; if ( typeof value === "string" ) { result [ key ] = resolver ( result ( value , true ) ) ; } else if ( Array . isArray ( value ) && value . length === 2 && typeof value [ 0 ] === "string" && typeof value [ 1 ] === "object" ) { result [ key ] = build ( result ( value [ 0 ] , true ) , value [ 1 ] ) ; } else { throw new TypeError ( "Invalid value at: " + key ) ; } } ) ; return result ; }
Process configuration file
Process configuration file