12345678910111213141516171819202122232425262728293031323334353637 |
- import baseRepeat from './_baseRepeat.js';
- import isIterateeCall from './_isIterateeCall.js';
- import toInteger from './toInteger.js';
- import toString from './toString.js';
- function repeat(string, n, guard) {
- if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
- n = 1;
- } else {
- n = toInteger(n);
- }
- return baseRepeat(toString(string), n);
- }
- export default repeat;
|