This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/string/repeat.mjs
T

16 lines
389 B
JavaScript

import { isIterateeCall } from '../_internal/isIterateeCall.mjs';
import { toInteger } from '../util/toInteger.mjs';
import { toString } from '../util/toString.mjs';
function repeat(str, n, guard) {
if (guard ? isIterateeCall(str, n, guard) : n === undefined) {
n = 1;
}
else {
n = toInteger(n);
}
return toString(str).repeat(n);
}
export { repeat };