function _formatMatch(match) {
  if (Array.isArray(match)) {
    if (match.length > 1) {
      return { $or: [].concat(match.map(m => Object.assign({}, m))) };
    }
    return Object.assign({}, match[0]);
  }
  return Object.assign({}, match);
}
Format `mod.match` given that it may be an array that we need to $or if
the client has multiple docs with match functions
@param {Array|Any} match
@api private