Skip to content

Commit

Permalink
end of an era 😔
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Dec 29, 2024
1 parent 3baddf4 commit 6c4e989
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ export function nArray<T>(n: number, c: (i: number) => T): T[] {
return d;
}

// Eat your heart out, npm.
export function leftPad(S: string, spaces: number, ch: string = '0'): string {
while (S.length < spaces)
S = `${ch}${S}`;
return S;
return S.padStart(spaces, ch);
}

export function hexzero(n: number, spaces: number): string {
Expand Down

0 comments on commit 6c4e989

Please sign in to comment.