Apply let/const transform.

This commit is contained in:
John-David Dalton
2017-01-07 23:18:22 -08:00
parent 4c881b2726
commit 10f64ee9c4
103 changed files with 207 additions and 207 deletions

View File

@@ -6,7 +6,7 @@ import stringSize from './_stringSize.js';
import stringToArray from './_stringToArray.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
const nativeCeil = Math.ceil;
/**
* Creates the padding for `string` based on `length`. The `chars` string
@@ -20,11 +20,11 @@ var nativeCeil = Math.ceil;
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
const charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
const result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);