removeAtOr
removeAtOr(target, idx, or)
Removes the element at index idx
from target
array. Supports negative indices to count from the end. If the index is out of bounds, returns the fallback value or
.
ts
removeAtOr([1, 2, 3], 1, []); // [1, 3]
removeAtOr([1, 2, 3], 5, []); // []
ts
pipe([1, 2, 3], removeAtOr(1, [])); // [1, 3]
pipe([1, 2, 3], removeAtOr(5, [])); // []