"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ensureSafeIndex = void 0;
var ensureSafeIndex = exports.ensureSafeIndex = function ensureSafeIndex(index, listSize) {
  if (index < 0) {
    return 0;
  }
  if (index > listSize) {
    return listSize;
  }
  return index;
};