mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.6.0.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
define(['../internal/baseToString', '../internal/createPad'], function(baseToString, createPad) {
|
||||
define(['../internal/createPadDir'], function(createPadDir) {
|
||||
|
||||
/**
|
||||
* Pads `string` on the left side if it is shorter then the given padding
|
||||
* length. The `chars` string may be truncated if the number of padding
|
||||
* characters exceeds the padding length.
|
||||
* Pads `string` on the left side if it is shorter than `length`. Padding
|
||||
* characters are truncated if they exceed `length`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -23,10 +22,7 @@ define(['../internal/baseToString', '../internal/createPad'], function(baseToStr
|
||||
* _.padLeft('abc', 3);
|
||||
* // => 'abc'
|
||||
*/
|
||||
function padLeft(string, length, chars) {
|
||||
string = baseToString(string);
|
||||
return string && (createPad(string, length, chars) + string);
|
||||
}
|
||||
var padLeft = createPadDir();
|
||||
|
||||
return padLeft;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user