code: function mergeConfiguration(options, defaults) {
      var config = {};
      var local = {};
      var localPath = options.__localPath || '/data/local.js';
      var reallyLocalPath = self.rootDir + localPath;
  
      if (fs.existsSync(reallyLocalPath)) {
        local = require(reallyLocalPath);
      }
  
      // Otherwise making a second apos instance
      // uses the same modified defaults object
  
      config = _.cloneDeep(options.__testDefaults || defaults);
  
      _.merge(config, options);
  
      if (typeof (local) === 'function') {
        if (local.length === 1) {
          _.merge(config, local(self));
        } else if (local.length === 2) {
          local(self, config);
        } else {
          throw new Error('data/local.js may export an object, a function that takes apos as an argument and returns an object, OR a function that takes apos and config as objects and directly modifies config');
        }
      } else {
        _.merge(config, local || {});
      }
  
      return config;
    }
docs: SUPPORTING FUNCTIONS BEGIN HERE Merge configuration from defaults, data/local.js and app.js