Skip to content

Commit

Permalink
style(std/archive): add default value on argument (denoland/deno#8582)
Browse files Browse the repository at this point in the history
  • Loading branch information
behnammodi authored Dec 1, 2020
1 parent 03b4fb6 commit 9aecb6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions archive/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function clean(length: number): Uint8Array {
return buffer;
}

function pad(num: number, bytes: number, base?: number): string {
const numString = num.toString(base || 8);
function pad(num: number, bytes: number, base = 8): string {
const numString = num.toString(base);
return "000000000000".substr(numString.length + 12 - bytes) + numString;
}

Expand Down

0 comments on commit 9aecb6c

Please sign in to comment.