lib/utils.js
function smartIndexOf(array, test) {
    var index = -1;
    if (!array || !test) return index;
    var length = array.length;
    if (!length) return index;
    while (++index < length) {
        if (test(array[index], index, array)) return index;
    }
    return -1;
}
function smartIndexOf(array, test) {
    var index = -1;
    if (!array || !test) return index;
    var length = array.length;
    if (!length) return index;
    while (++index < length) {
        if (test(array[index], index, array)) return index;
    }
    return -1;
}
function smartIndexOf ( array , test ) { var index = - 1 ; if ( ! array || ! test ) return index ; var length = array . length ; if ( ! length ) return index ; while ( ++ index < length ) { if ( test ( array [ index ] , index , array ) ) return index ; } return - 1 ; }
Find index of array member  that passes test
Find index of array member that passes test