Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
dec2hex
and dec2bits
cannot use >>>
for coercion because i…
…t only works up to 32 bits Instead now we do runtime checks to see if the parameters are positive. At the same time, we have made the `size` parameter optional, if it is left `undefined`, then the size will be automatically acquired based on the size of the `dec`. This means: ``` dec2bits(1) === '1' dec2bits(100) === '64' dec2bits(100, 0) === '' dec2bits(Number.MAX_SAFE_INTEGER, 0) === '1fffffffffffff' ``` Similar for `dec2bits`.
- Loading branch information