lib/index.js
function(what) {
    var mainData = what;
    var localData = {};
    if (typeof what == 'string') {
      // main
      var mainFile = path.resolve(process.cwd(), what);
      delete require.cache[mainFile];
      mainData = require(mainFile);
      // local
      var localFile = mainFile.substr(0, mainFile.lastIndexOf('.'))+'.local'+path.extname(mainFile);
      if (fs.existsSync(localFile)) {
        delete require.cache[localFile];
        localData = require(localFile);
      }
    }
    // main and local merged
    return _.merge({},
      _.merge({}, mainData.default, mainData[this.env]),
      _.merge({}, localData.default, localData[this.env])
    );
  }
function(what) {
    var mainData = what;
    var localData = {};
    if (typeof what == 'string') {
      // main
      var mainFile = path.resolve(process.cwd(), what);
      delete require.cache[mainFile];
      mainData = require(mainFile);
      // local
      var localFile = mainFile.substr(0, mainFile.lastIndexOf('.'))+'.local'+path.extname(mainFile);
      if (fs.existsSync(localFile)) {
        delete require.cache[localFile];
        localData = require(localFile);
      }
    }
    // main and local merged
    return _.merge({},
      _.merge({}, mainData.default, mainData[this.env]),
      _.merge({}, localData.default, localData[this.env])
    );
  }
function ( what ) { var mainData = what ; var localData = { } ; if ( typeof what == 'string' ) { // main var mainFile = path . resolve ( process . cwd ( ) , what ) ; delete require . cache [ mainFile ] ; mainData = require ( mainFile ) ; // local var localFile = mainFile . substr ( 0 , mainFile . lastIndexOf ( '.' ) ) + '.local' + path . extname ( mainFile ) ; if ( fs . existsSync ( localFile ) ) { delete require . cache [ localFile ] ; localData = require ( localFile ) ; } } // main and local merged return _ . merge ( { } , _ . merge ( { } , mainData . default , mainData [ this . env ] ) , _ . merge ( { } , localData . default , localData [ this . env ] ) ) ; }
Reads the `what` parameter and returns it's content.

@param {object|string} what
@return {object}
Reads the what parameter and returns it s content .