js/util/Mappy.js
function betterIndexOf(arr, value) {
    if (value != value || value === 0) { // eslint-disable-line eqeqeq
        var i = arr.length;
        while (i-- && !is(arr[i], value)) {
            // eslint-disable-line no-empty
        }
    } else {
        i = [].indexOf.call(arr, value);
    }
    return i;
}
function betterIndexOf(arr, value) {
    if (value != value || value === 0) { // eslint-disable-line eqeqeq
        var i = arr.length;
        while (i-- && !is(arr[i], value)) {
            // eslint-disable-line no-empty
        }
    } else {
        i = [].indexOf.call(arr, value);
    }
    return i;
}
function betterIndexOf ( arr , value ) { if ( value != value || value === 0 ) { // eslint-disable-line eqeqeq var i = arr . length ; while ( i -- && ! is ( arr [ i ] , value ) ) { // eslint-disable-line no-empty } } else { i = [ ] . indexOf . call ( arr , value ) ; } return i ; }
More reliable indexOf, courtesy of @WebReflection
More reliable indexOf courtesy of