@polgubau/utils
Version:
A collection of utility functions for TypeScript
13 lines • 300 B
JavaScript
// src/arrays/remove.ts
function remove(arr, index) {
const adjustedIndex = index < 0 ? arr.length + index : index;
if (adjustedIndex < 0 || adjustedIndex >= arr.length) {
return arr;
}
arr.splice(adjustedIndex, 1);
return arr;
}
export {
remove
};
//# sourceMappingURL=remove.mjs.map