.min ||
                         opt_config.shrinkMin && range.min > bounds.min);
      const useRangeMax = (opt_config.expandMax && range.max > bounds.max ||
                         opt_config.shrinkMax && range.max < bounds.max);

      // Neither bound is modified.
      if (!useRangeMin && !useRangeMax) return;

      // Both bounds are modified. Assuming the range argument is a valid
      // range, no extra checks are necessary.
      if (useRangeMin && useRangeMax) {
        bounds.min = range.min;
