mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +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, '_-')
|
* pad('abc', 8, '_-')
|
||||||
* // => '_-abc_-_'
|
* // => '_-abc_-_'
|
||||||
*
|
*
|
||||||
* pad('abc', 3)
|
* pad('abc', 2)
|
||||||
* // => 'abc'
|
* // => 'abc'
|
||||||
*/
|
*/
|
||||||
function pad(string, length, chars) {
|
function pad(string, length, chars) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import stringSize from './.internal/stringSize.js'
|
|||||||
* padEnd('abc', 6, '_-')
|
* padEnd('abc', 6, '_-')
|
||||||
* // => 'abc_-_'
|
* // => 'abc_-_'
|
||||||
*
|
*
|
||||||
* padEnd('abc', 3)
|
* padEnd('abc', 2)
|
||||||
* // => 'abc'
|
* // => 'abc'
|
||||||
*/
|
*/
|
||||||
function padEnd(string, length, chars) {
|
function padEnd(string, length, chars) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import stringSize from './.internal/stringSize.js'
|
|||||||
* padStart('abc', 6, '_-')
|
* padStart('abc', 6, '_-')
|
||||||
* // => '_-_abc'
|
* // => '_-_abc'
|
||||||
*
|
*
|
||||||
* padStart('abc', 3)
|
* padStart('abc', 2)
|
||||||
* // => 'abc'
|
* // => 'abc'
|
||||||
*/
|
*/
|
||||||
function padStart(string, length, chars) {
|
function padStart(string, length, chars) {
|
||||||
|
|||||||
Reference in New Issue
Block a user