I know it probably predates
String.prototype.padStart(), but it boggles my mind that people aren’t just using the standard one.

String.prototype.padStart() - JavaScript | MDN
The padStart() method of String values pads this string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length. The padding is applied from the start of this string.
MDN Web Docs