function _comparator(order) {
    if (order === 'asc') {
      return compareAsc;
    } else if (order === 'desc') {
      return compareDesc;
    } else if (order === 'natural') {
      return compareNatural;
    } else {
      throw new Error('String "asc", "desc", or "natural" expected');
    }
  }
Get the comparator for given order ('asc', 'desc', 'natural')
@param {'asc' | 'desc' | 'natural'} order
@return {Function} Returns a _comparator function