UNPKG

@n3okill/utils

Version:
16 lines 635 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.padStart = padStart; const pad_1 = require("./pad"); /** * Pads the current string with another string (repeated, if needed) so that the resulting string reaches the given length * The padding is applied form the start (left) of the string * @param str string to be padded * @param length Final size of the string * @param padString String to be added to the string * @returns Padded string */ function padStart(str, length, padString = " ") { return (0, pad_1.pad)(str, length, padString, true); } //# sourceMappingURL=padStart.js.map