Bump to v4.3.0.

This commit is contained in:
John-David Dalton
2016-05-12 00:07:57 -07:00
parent ecb20e4c11
commit 607a8b4075
489 changed files with 28858 additions and 13157 deletions

View File

@@ -1,4 +1,4 @@
# lodash.pad v4.2.0
# lodash.pad v4.3.0
The [lodash](https://lodash.com/) method `_.pad` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var pad = require('lodash.pad');
```
See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.2.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/4.3.0-npm-packages/lodash.pad) for more details.

View File

@@ -1,12 +1,13 @@
/**
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
* lodash 4.3.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var toString = require('lodash.tostring');
var baseSlice = require('lodash._baseslice'),
toString = require('lodash.tostring');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
@@ -134,6 +135,21 @@ function baseRepeat(string, n) {
return result;
}
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
/**
* Creates the padding for `string` based on `length`. The `chars` string
* is truncated if the number of characters exceeds `length`.
@@ -152,7 +168,7 @@ function createPadding(length, chars) {
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return reHasComplexSymbol.test(chars)
? stringToArray(result).slice(0, length).join('')
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.pad",
"version": "4.2.0",
"version": "4.3.0",
"description": "The lodash method `_.pad` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -15,6 +15,7 @@
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseslice": "~4.0.0",
"lodash.tostring": "^4.0.0"
}
}