mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v3.6.0.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
var baseToString = require('../internal/baseToString'),
|
||||
createPad = require('../internal/createPad');
|
||||
createPadding = require('../internal/createPadding');
|
||||
|
||||
/** Native method references. */
|
||||
var ceil = Math.ceil,
|
||||
@@ -9,9 +9,8 @@ var ceil = Math.ceil,
|
||||
var nativeIsFinite = global.isFinite;
|
||||
|
||||
/**
|
||||
* Pads `string` on the left and right sides if it is shorter then the given
|
||||
* padding length. The `chars` string may be truncated if the number of padding
|
||||
* characters can't be evenly divided by the padding length.
|
||||
* Pads `string` on the left and right sides if it is shorter than `length`.
|
||||
* Padding characters are truncated if they can't be evenly divided by `length`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -43,7 +42,7 @@ function pad(string, length, chars) {
|
||||
leftLength = floor(mid),
|
||||
rightLength = ceil(mid);
|
||||
|
||||
chars = createPad('', rightLength, chars);
|
||||
chars = createPadding('', rightLength, chars);
|
||||
return chars.slice(0, leftLength) + string + chars;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user