Tech debt: Consistency of handling indexOf in Javascript
Description
Keep consistent in handling returning values from indexOf
(javascript).
Proposal
Use === -1
or !== 1
instead of < 0
or >= 0
.
Links / references
Bikeshed discussion during code review appeared in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9271#note_24107461.