function splitByYear(files) {
  let result = {};
  files.forEach(function(file) {
    const year = file.datePublishedYear;
    if (!result[year]) {
      result[year] = [];
    }
    result[year].push(file);
  });
  return result;
}
Splits a list of files by year published

@param {Array} files The array of files to split.
@return {Object} A list of files split by year.