function loadConfig(config) {
  let loadedConfig = null;
  if (typeof config === 'string') {
    const resolvedPath = path.isAbsolute(config) ? config : path.join(path.resolve(), config);
    try {
      const stats = fs.statSync(resolvedPath);
      const mtime = `${stats.mtime || ''}`;
      if (stats === null) {
        // Default to no config
        loadedConfig = {};
      } else if (lastModifiedDate !== mtime) {
        // Load the config based on path
        lastModifiedDate = mtime;
        loadedConfig = requireUncached(resolvedPath);
      } else {
        // Unchanged config
        loadedConfig = null;
      }
    } catch (err) {
      // Default to no config
      loadedConfig = {};
    } finally {
      return loadedConfig;
    }
  } else {
    if (typeof config === 'object' && config !== null) {
      return config;
    }
    return {};
  }
}
Load the config from a path string or parsed from an object
@param {string|Object} config
@returns `null` when unchanged, `{}` when not found