Convert hex string to integer using Javascript

Mostly helpful to convert solidity transaction log data hex string into integer

Snippet

const hexToString = (hexString: String): number => {
    return parseInt(Number(hexString).toString());
}

hexToString("0x30000000000000000000000000000000000000000000000000000000000000064"); // -> 3