index.js
function formatAwards(raw) {
    var wins, nominations;

    if (!raw) {
        return { wins: 0, nominations: 0, text: '' };
    }

    wins = raw.match(/(\d+) wins?/i);
    nominations = raw.match(/(\d+) nominations?/i);

    return {
        wins: wins ? +wins[1] : 0,
        nominations: nominations ? +nominations[1] : 0,
        text: raw
    };
}
function formatAwards(raw) {
    var wins, nominations;

    if (!raw) {
        return { wins: 0, nominations: 0, text: '' };
    }

    wins = raw.match(/(\d+) wins?/i);
    nominations = raw.match(/(\d+) nominations?/i);

    return {
        wins: wins ? +wins[1] : 0,
        nominations: nominations ? +nominations[1] : 0,
        text: raw
    };
}
function formatAwards ( raw ) { var wins , nominations ; if ( ! raw ) { return { wins : 0 , nominations : 0 , text : '' } ; } wins = raw . match ( / (\d+) wins? / i ) ; nominations = raw . match ( / (\d+) nominations? / i ) ; return { wins : wins ? + wins [ 1 ] : 0 , nominations : nominations ? + nominations [ 1 ] : 0 , text : raw } ; }
Try to find the win and nomination count, but also keep raw just in case.
Try to find the win and nomination count but also keep raw just in case .