-export const splice = makeCallable(arrayPrototype.splice);
-
-/**
- * Returns the result of converting the provided value to an array
- * index, or throws an error if it is out of range.
- */
-export const toIndex = ($) => {
- const integer = floor($);
- if (isNan(integer) || integer == 0) {
- // The value is zero·like.
- return 0;
- } else {
- // The value is not zero·like.
- const clamped = toLength(integer);
- if (clamped !== integer) {
- // Clamping the value changes it.
- throw new RangeError(`Piscēs: Index out of range: ${$}.`);
- } else {
- // The value is within appropriate bounds.
- return integer;
- }
- }
-};
-
-/** Returns the result of converting the provided value to a length. */
-export const toLength = ($) => {
- const len = floor($);
- return isNan(len) || len == 0
- ? 0
- : max(min(len, MAXIMUM_SAFE_INTEGRAL_NUMBER), 0);
-};