0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

style(std/archive): add default value on argument (#8582)

This commit is contained in:
Behnam Mohammadi 2020-12-02 01:49:30 +03:30 committed by GitHub
parent abc883e6a7
commit 6e03917b51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}