Skip to content

Commit

Permalink
style(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 and denobot committed Feb 1, 2021
1 parent 9c9982a commit 5079c79
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 5079c79

Please sign in to comment.