Files
tekelanew_acs/acs/nladmin-ui/node_modules/xe-utils/helperStringRepeat.js

12 lines
306 B
JavaScript
Raw Normal View History

2024-12-03 17:40:13 +08:00
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