From 9aecb6cf9b4a20534baee6e032018b12f0690630 Mon Sep 17 00:00:00 2001 From: Behnam Mohammadi Date: Wed, 2 Dec 2020 01:49:30 +0330 Subject: [PATCH] style(std/archive): add default value on argument (denoland/deno#8582) --- archive/tar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive/tar.ts b/archive/tar.ts index 4edb76c0257e8..1211fa2875df8 100644 --- a/archive/tar.ts +++ b/archive/tar.ts @@ -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; }