function buildIconsObject(svgFiles, getSvg) {
  return svgFiles
    .map(svgFile => {
      const name = path.basename(svgFile, '.svg');
      const svg = getSvg(svgFile);
      const contents = getSvgContents(svg);
      return { name, contents };
    })
    .reduce((icons, icon) => {
      icons[icon.name] = icon.contents;
      return icons;
    }, {});
}
Build an object in the format: `{ <name>: <contents> }`.
@param {string[]} svgFiles - A list of filenames.
@param {Function} getSvg - A function that returns the contents of an SVG file given a filename.
@returns {Object}