sortFormatsBy = (a, b, sortBy) => {
  let res = 0;
  for (let fn of sortBy) {
    res = fn(b) - fn(a);
    if (res !== 0) {
      break;
    }
  }
  return res;
}
Sort formats by a list of functions.

@param {Object} a
@param {Object} b
@param {Array.<Function>} sortBy
@returns {number}