module.exports.format = function(num) { return num < 10 ? '0' + num : num; } {{formattedTime}} {{this.format(timeData[timeRange[index]])}} {{splitWithUnit ? timeDataUnit[timeRange[index]] : ':'}}