You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
306 B
11 lines
306 B
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
|
|
|