peterolson / BigInteger.js

An arbitrary length integer library for Javascript
The Unlicense
1.12k stars 187 forks source link

Add base converters #201

Closed IkechukwuAKalu closed 4 years ago

IkechukwuAKalu commented 4 years ago

This commit adds base conversion functionality to binary and hexadecimal representations.

Usage bigInt(10).binary(); bigInt(10).hex();

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.9%) to 93.38% when pulling 0d4f35938d2cd01f40f75bc326ac5c8060abcc31 on IkechukwuAKalu:add-base-converters into 67a715c917bd0eb0c106c45935b889269a24dcef on peterolson:master.

peterolson commented 4 years ago

This functionality already exists using the toString(base) functionality, and it is not limited to only binary and hex.