Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,12 +1,12 @@
import baseRepeat from './baseRepeat.js';
import baseToString from './baseToString.js';
import castSlice from './castSlice.js';
import hasUnicode from './hasUnicode.js';
import stringSize from './stringSize.js';
import stringToArray from './stringToArray.js';
import baseRepeat from './baseRepeat.js'
import baseToString from './baseToString.js'
import castSlice from './castSlice.js'
import hasUnicode from './hasUnicode.js'
import stringSize from './stringSize.js'
import stringToArray from './stringToArray.js'
/* Built-in method references for those with the same name as other `lodash` methods. */
const nativeCeil = Math.ceil;
const nativeCeil = Math.ceil
/**
* Creates the padding for `string` based on `length`. The `chars` string
@@ -18,16 +18,16 @@ const nativeCeil = Math.ceil;
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
chars = chars === undefined ? ' ' : baseToString(chars)
const charsLength = chars.length;
const charsLength = chars.length
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
return charsLength ? baseRepeat(chars, length) : chars
}
const 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);
: result.slice(0, length)
}
export default createPadding;
export default createPadding