Bump to v4.4.0.

This commit is contained in:
John-David Dalton
2016-04-12 23:55:57 -07:00
parent 04e08670ed
commit fb1f99d9d9
415 changed files with 36968 additions and 4619 deletions

View File

@@ -1,4 +1,4 @@
# lodash.padstart v4.3.0
# lodash.padstart v4.4.0
The [lodash](https://lodash.com/) method `_.padStart` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var padStart = require('lodash.padstart');
```
See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.padstart) for more details.
See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.padstart) for more details.

View File

@@ -1,12 +1,13 @@
/**
* lodash 4.3.0 (Custom Build) <https://lodash.com/>
* lodash 4.4.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.padstart",
"version": "4.3.0",
"version": "4.4.0",
"description": "The lodash method `_.padStart` 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"
}
}