error-if-index-is-negative (npm): Function triggers error if a given index is a negative number, meaning the item was not found in the array.
Keywords: array|index|validation|checking|error|message|javascript