peterolson / BigInteger.js

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

add support '0x' '0b' '0o' strings #235

Closed bdtren closed 2 years ago

bdtren commented 2 years ago

This is for fixing issue https://github.com/peterolson/BigInteger.js/issues/205#issue-602199428 My approach is convert src data(whenever it is number or string), compare it with prefixes( '0x' '0b' '0o') And use built in function parseInt() to convert it.

peterolson commented 2 years ago

A few issues with this: