function isSorted(arr, func, strict) {
  const compare = func || ascending;
  return arr.every(function (currentVal, index) {
    if (index === 0) {
      return true;
    }
    const res = compare(arr[index - 1], currentVal);
    return !(res > 0 || (strict && res === 0));
  });
}
@param {Array<*>} arr The array to test.
@param {Function} [func] Comparison function.
@param {boolean} [strict] Strictly sorted (default false).
@return {boolean} Return index.