Bump to v3.10.0.

This commit is contained in:
jdalton
2015-06-14 22:21:58 -07:00
parent 6ee2b9a7b8
commit 4bd2890bbd
121 changed files with 777 additions and 649 deletions

View File

@@ -2,12 +2,10 @@ import baseToString from '../internal/baseToString';
import createPadding from '../internal/createPadding';
import root from '../internal/root';
/** Native method references. */
var ceil = Math.ceil,
floor = Math.floor;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = root.isFinite;
var nativeCeil = Math.ceil,
nativeFloor = Math.floor,
nativeIsFinite = root.isFinite;
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
@@ -40,8 +38,8 @@ function pad(string, length, chars) {
return string;
}
var mid = (length - strLength) / 2,
leftLength = floor(mid),
rightLength = ceil(mid);
leftLength = nativeFloor(mid),
rightLength = nativeCeil(mid);
chars = createPadding('', rightLength, chars);
return chars.slice(0, leftLength) + string + chars;