index.js
function formatRuntime(raw) {
    var hours, minutes;

    if (!raw) {
        return null;
    }

    hours = raw.match(/(\d+) h/);
    minutes = raw.match(/(\d+) min/);

    hours = hours ? hours[1] : 0;
    minutes = minutes ? +minutes[1] : 0;

    return (hours * 60) + minutes;
}
function formatRuntime(raw) {
    var hours, minutes;

    if (!raw) {
        return null;
    }

    hours = raw.match(/(\d+) h/);
    minutes = raw.match(/(\d+) min/);

    hours = hours ? hours[1] : 0;
    minutes = minutes ? +minutes[1] : 0;

    return (hours * 60) + minutes;
}
function formatRuntime ( raw ) { var hours , minutes ; if ( ! raw ) { return null ; } hours = raw . match ( / (\d+) h / ) ; minutes = raw . match ( / (\d+) min / ) ; hours = hours ? hours [ 1 ] : 0 ; minutes = minutes ? + minutes [ 1 ] : 0 ; return ( hours * 60 ) + minutes ; }
Format strings of hours & minutes into minutes. For example, "1 h 30 min" == 90.
Format strings of hours & minutes into minutes . For example 1 h 30 min == 90 .