UNPKG

xe-utils

Version:

JavaScript 函数库、工具类

10 lines (8 loc) • 312 B
import staticParseInt from './staticParseInt.js';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 : '') } export default helperStringRepeat