UNPKG

317 BJavaScriptView Raw
1var staticParseInt = require('./staticParseInt')
2
3function helperStringRepeat (str, count) {
4 if (str.repeat) {
5 return str.repeat(count)
6 }
7 var list = isNaN(count) ? [] : new Array(staticParseInt(count))
8 return list.join(str) + (list.length > 0 ? str : '')
9}
10
11module.exports = helperStringRepeat