Files
毛财君 197b38ca6f 1
2023-07-06 17:37:33 +08:00

12 lines
306 B
JavaScript

var staticParseInt = require('./staticParseInt')
function helperStringRepeat (str, count) {
if (str.repeat) {
return str.repeat(count)
}
var list = isNaN(count) ? [] : new Array(staticParseInt(count))
return list.join(str) + (list.length > 0 ? str : '')
}
module.exports = helperStringRepeat