const getMostRecentSource = function getMostRecentSource(sources) {
  if (!sources || sources.length < 1) return undefined;
  return sources.reduce((max, source) => {
    if (!source) return max;
    if (!max) return source;
    if (source.metadata.lastUpdated > max.metadata.lastUpdated) return source;
    return max;
  });
};
export default getMostRecentSource;