mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Update _.pad* examples to show pad length < string. (#3088)
One example now shows that specifying a padding length of less than the length of the string returns the entire original string.
This commit is contained in:
committed by
John-David Dalton
parent
43a520c971
commit
b679e9cc22
2
pad.js
2
pad.js
@@ -19,7 +19,7 @@ import stringSize from './.internal/stringSize.js'
|
||||
* pad('abc', 8, '_-')
|
||||
* // => '_-abc_-_'
|
||||
*
|
||||
* pad('abc', 3)
|
||||
* pad('abc', 2)
|
||||
* // => 'abc'
|
||||
*/
|
||||
function pad(string, length, chars) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import stringSize from './.internal/stringSize.js'
|
||||
* padEnd('abc', 6, '_-')
|
||||
* // => 'abc_-_'
|
||||
*
|
||||
* padEnd('abc', 3)
|
||||
* padEnd('abc', 2)
|
||||
* // => 'abc'
|
||||
*/
|
||||
function padEnd(string, length, chars) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import stringSize from './.internal/stringSize.js'
|
||||
* padStart('abc', 6, '_-')
|
||||
* // => '_-_abc'
|
||||
*
|
||||
* padStart('abc', 3)
|
||||
* padStart('abc', 2)
|
||||
* // => 'abc'
|
||||
*/
|
||||
function padStart(string, length, chars) {
|
||||
|
||||
Reference in New Issue
Block a user