lib/utils.js
function indexById(array, id) {
    if (!array) return -1;
    return smartIndexOf(array, function (obj) {
        return obj.id === id;
    });
}
function indexById(array, id) {
    if (!array) return -1;
    return smartIndexOf(array, function (obj) {
        return obj.id === id;
    });
}
function indexById ( array , id ) { if ( ! array ) return - 1 ; return smartIndexOf ( array , function ( obj ) { return obj . id === id ; } ) ; }
Returns index of object with matching id property
Returns index of object with matching id property