UNPKG

@prelude/array

Version:

Array module.

10 lines 355 B
import swap from './swap.js'; const swapDeleteAt = (values, index) => { if (index < 0 || index >= values.length) { throw new TypeError(`Out of bounds index ${index}, length ${values.length}.`); } swap(values, index, values.length - 1); return values.pop(); }; export default swapDeleteAt; //# sourceMappingURL=swap-delete-at.js.map