Unify padding impls and consistently use them

This commit is contained in:
Wesley Wigham
2020-02-19 17:21:51 -08:00
parent 77d3a69039
commit 4a34294908
4 changed files with 16 additions and 23 deletions

View File

@@ -33,21 +33,6 @@ namespace ts {
return options.pretty;
}
function padLeft(s: string, length: number) {
while (s.length < length) {
s = " " + s;
}
return s;
}
function padRight(s: string, length: number) {
while (s.length < length) {
s = s + " ";
}
return s;
}
function getOptionsForHelp(commandLine: ParsedCommandLine) {
// Sort our options by their names, (e.g. "--noImplicitAny" comes before "--watch")
return !!commandLine.options.all ?