"varInt" refers to the varInt object, which is not actually implemented yet. This function should therefore really be called readVarIntNum.
Javascript only supports 64 bit floating points, which have uint precision up to Math.pow(2, 53). We now support reading variable sized numbers up to that size. If the number is bigger than that, then we need to use BN.