xe-utils
Version:
JavaScript 函数库、工具类
13 lines (11 loc) • 357 B
JavaScript
import toValueString from './toValueString.js';import helperStringRepeat from './helperStringRepeat.js';/**
* 将字符串重复 n 次
*
* @param {String} str 字符串
* @param {Number} count 次数
* @return {String}
*/
function repeat (str, count) {
return helperStringRepeat(toValueString(str), count)
}
export default repeat