mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import repeat from '../string/repeat';
|
||||
import root from './root';
|
||||
|
||||
/** Native method references. */
|
||||
var ceil = Math.ceil;
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeIsFinite = root.isFinite;
|
||||
var nativeCeil = Math.ceil,
|
||||
nativeIsFinite = root.isFinite;
|
||||
|
||||
/**
|
||||
* Creates the padding required for `string` based on the given `length`.
|
||||
@@ -26,7 +24,7 @@ function createPadding(string, length, chars) {
|
||||
}
|
||||
var padLength = length - strLength;
|
||||
chars = chars == null ? ' ' : (chars + '');
|
||||
return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength);
|
||||
return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
|
||||
}
|
||||
|
||||
export default createPadding;
|
||||
|
||||
Reference in New Issue
Block a user