docs: function sortBy(props, opts) {
    opts = opts || {};
  
    return function compareFn(a, b) {
      var len = props.length, i = -1;
      var result;
  
      while (++i < len) {
        result = compare(props[i], a, b);
        if (result !== 0) {
          break;
        }
      }
      if (opts.reverse === true) {
        return result * -1;
      }
      return result;
    };
  }