diff --git a/src/helpers/values.ts b/src/helpers/values.ts index 548ca67..6f7dd98 100644 --- a/src/helpers/values.ts +++ b/src/helpers/values.ts @@ -52,10 +52,7 @@ export function parseBoolean(val: string | undefined | null): boolean { * is zero length. */ export function bufferToHex(buff: Buffer, prefix: boolean = true): string { - if (buff.length === 0) { - return ''; - } - return prefix ? '0x' : '' + buff.toString('hex'); + return buff.length === 0 ? '' : (prefix ? '0x' : '') + buff.toString('hex'); } /**