lib/index.js
function (time, n) {
    time = Number(time) || 0;
    n = n || 2;

    if (n === 2) {
      time = time < 10 ? time + '0' : time;
    } else if (n === 3) {
      time = time < 10
        ? time + '00'
        : time < 100
          ? time + '0'
          : time;
    }

    return String(time);
  }
function (time, n) {
    time = Number(time) || 0;
    n = n || 2;

    if (n === 2) {
      time = time < 10 ? time + '0' : time;
    } else if (n === 3) {
      time = time < 10
        ? time + '00'
        : time < 100
          ? time + '0'
          : time;
    }

    return String(time);
  }
function ( time , n ) { time = Number ( time ) || 0 ; n = n || 2 ; if ( n === 2 ) { time = time < 10 ? time + '0' : time ; } else if ( n === 3 ) { time = time < 10 ? time + '00' : time < 100 ? time + '0' : time ; } return String ( time ) ; }
Format a time number.
@private
@param  {Number} time
@param  {Number} n - Number of digits to show. Default 2.
@return {String}
Format a time number .