mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Fixin repeat import.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import baseRepeat from './baseRepeat.js'
|
||||
import repeat from '../repeat.js'
|
||||
import baseToString from './baseToString.js'
|
||||
import castSlice from './castSlice.js'
|
||||
import hasUnicode from './hasUnicode.js'
|
||||
@@ -19,9 +19,9 @@ function createPadding(length, chars) {
|
||||
|
||||
const charsLength = chars.length
|
||||
if (charsLength < 2) {
|
||||
return charsLength ? baseRepeat(chars, length) : chars
|
||||
return charsLength ? repeat(chars, length) : chars
|
||||
}
|
||||
const result = baseRepeat(chars, Math.ceil(length / stringSize(chars)))
|
||||
const result = repeat(chars, Math.ceil(length / stringSize(chars)))
|
||||
return hasUnicode(chars)
|
||||
? castSlice(stringToArray(result), 0, length).join('')
|
||||
: result.slice(0, length)
|
||||
|
||||
Reference in New Issue
Block a user