getFormatByQuality = (quality, formats) => {
  let getFormat = itag => formats.find(format => `${format.itag}` === `${itag}`);
  if (Array.isArray(quality)) {
    return getFormat(quality.find(q => getFormat(q)));
  } else {
    return getFormat(quality);
  }
}
Gets a format based on quality or array of quality's

@param {string|[string]} quality
@param {[Object]} formats
@returns {Object}