lib/load-file.js
function loadFile(filepath, defaultObj) {
  defaultObj = defaultObj || {};

  if (!isFile(filepath)) { return defaultObj; }

  var extension = path.extname(filepath).replace(/^\./, '');
  var contents = supportedExtensions[extension](filepath);

  return assign({}, defaultObj, contents);
}
function loadFile(filepath, defaultObj) {
  defaultObj = defaultObj || {};

  if (!isFile(filepath)) { return defaultObj; }

  var extension = path.extname(filepath).replace(/^\./, '');
  var contents = supportedExtensions[extension](filepath);

  return assign({}, defaultObj, contents);
}
function loadFile ( filepath , defaultObj ) { defaultObj = defaultObj || { } ; if ( ! isFile ( filepath ) ) { return defaultObj ; } var extension = path . extname ( filepath ) . replace ( / ^\. / , '' ) ; var contents = supportedExtensions [ extension ] ( filepath ) ; return assign ( { } , defaultObj , contents ) ; }
Loads a file, if it exists. If it doesn't, then return the default object or empty object
Loads a file if it exists . If it doesn t then return the default object or empty object