code: function swapVariables (configFile) {
    function readAndSwap (obj) {
      let altered = false
      do {
        let temp = transform(obj, obj)
        obj = temp.result
        altered = temp.changed
      } while (altered)
      return obj
    }
    function substitute (file, p) {
      let success = false
      let replaced = p.replace(/\${([\w.-]+)}/g, function (match, term) {
        if (!success) {
          success = _.has(file, term)
        }
        return _.get(file, term) || match
      })
      return {
        success: success,
        replace: replaced
      }
    }
    function transform (file, obj) {
      let changed = false
      let resultant = _.mapValues(obj, function (p) {
        if (_.isPlainObject(p)) {
          let transformed = transform(file, p)
          if (!changed && transformed.changed) {
            changed = true
          }
          return transformed.result
        }
        if (_.isString(p)) {
          let subbed = substitute(file, p)
          if (!changed && subbed.success) {
            changed = true
          }
          return subbed.replace
        }
        if (_.isArray(p)) {
          for (let i = 0; i < p.length; i++) {
            if (_.isString(p[i])) {
              p[i] = substitute(file, p[i]).replace
            }
          }
        }
        return p
      })
      return {
        changed: changed,
        result: resultant
      }
    }
    let file = options.multiFile ? _.mapValues(configFile, readAndSwap) : configFile
    file = _.merge({},
      file || {},
      file[environments.environmentType] || {}, {
        envId: environments.envId,
        ENVID: environments.ENVID,
        timestamp: timestamp,
        args
      })
    file = readAndSwap(file)
    return file
  }
docs: console.log('CONFIG:', load('config/config.yml')) 
  Swap config
  
  @param {any} configFile
  @returns {obj}