Lodash padStart
Pads a given string with a given characters OR spaces if none are provided.
js
// ' apple'
_.padStart("apple", 7);
// 'banana'
_.padStart("banana", 6);
// 'xyx'
_.padStart("", 3, "xy");
Note
lodash/fp
s padStart
does NOT support the third argument. For that use padCharsStart()
.