EASYAIuniappNewUI/node_modules/licia/repeat.js
2025-02-08 18:50:38 +08:00

13 lines
213 B
JavaScript

exports = function(str, n) {
var ret = '';
if (n < 1) return '';
while (n > 0) {
if (n & 1) ret += str;
n >>= 1;
str += str;
}
return ret;
};
module.exports = exports;