Bump to v4.15.0.

This commit is contained in:
John-David Dalton
2016-08-11 23:29:12 -07:00
parent cbf5cb1162
commit 28663c1e27
54 changed files with 344 additions and 217 deletions

View File

@@ -1,7 +1,7 @@
import baseRepeat from './_baseRepeat.js';
import baseToString from './_baseToString.js';
import castSlice from './_castSlice.js';
import reHasComplexSymbol from './_reHasComplexSymbol.js';
import hasUnicode from './_hasUnicode.js';
import stringSize from './_stringSize.js';
import stringToArray from './_stringToArray.js';
@@ -25,7 +25,7 @@ function createPadding(length, chars) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return reHasComplexSymbol.test(chars)
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}