/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */ 'use strict'; var repeat = require('repeat-string'); module.exports = function padLeft(str, num, ch) { ch = typeof ch !== 'undefined' ? (ch + '') : ' '; return repeat(ch, num) + str; };