repeat.js 118 Bytes Raw Blame History Permalink 1 2 3 4 module.exports = function repeat(str, times) { if (times < 0) { return '' } return new Array(times + 1).join(str) }