lodash.pad
Advanced tools
Comparing version 3.1.0 to 3.1.1
18
index.js
/** | ||
* lodash 3.1.0 (Custom Build) <https://lodash.com/> | ||
* lodash 3.1.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
@@ -12,11 +12,9 @@ * Available under MIT license <https://lodash.com/license> | ||
/** 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 = global.isFinite; | ||
var nativeCeil = Math.ceil, | ||
nativeFloor = Math.floor, | ||
nativeIsFinite = global.isFinite; | ||
/** | ||
* Pads `string` on the left and right sides if it is shorter than `length`. | ||
* Pads `string` on the left and right sides if it's shorter than `length`. | ||
* Padding characters are truncated if they can't be evenly divided by `length`. | ||
@@ -51,4 +49,4 @@ * | ||
var mid = (length - strLength) / 2, | ||
leftLength = floor(mid), | ||
rightLength = ceil(mid); | ||
leftLength = nativeFloor(mid), | ||
rightLength = nativeCeil(mid); | ||
@@ -55,0 +53,0 @@ chars = createPadding('', rightLength, chars); |
{ | ||
"name": "lodash.pad", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "The modern build of lodash’s `_.pad` as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.pad v3.1.0 | ||
# lodash.pad v3.1.1 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pad` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pad) for more details. | ||
See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.pad) for more details. |
4465
50