Files
SnowLuma/.pnpm-store/v11/files/09/e44d940a65d225eb544473556d9867694894baec23f8c12b580e0653fd471754a7f00e8b5c2133f0dc37564ca86b10f46bfe2a17a8b5ef14085aebe3eeaef6
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

11 lines
245 B
Plaintext

"use strict";
function pad(str, width, alignLeft = true) {
const diff = width - str.length;
if (diff <= 0) {
return str;
}
const padding = " ".repeat(diff);
return alignLeft ? str + padding : padding + str;
}
module.exports = pad;