justmoon / node-bignum

Big integers for Node.js using OpenSSL
420 stars 117 forks source link

Invalid type passed to bignum constructor #125

Closed VirtuousDeath closed 4 years ago

VirtuousDeath commented 4 years ago

hi, I am experiencing this issue with your bignum package.

I have downloaded the types for bignum and it forces me to create an instance of the default export.

What am I doing wrong? here is some of the code I made for this issue to happen, strangely it worked sometime ago

...
this.value = new bignum(value, base).abs().toString()
...

I wish you can help, thanks


May sound stupid, but can we actually convert bases with this version of bignum? As Example:

this.value = bignum(value, base)

Could be a good implementation, and set default base to 10. Anyways, I wish to check that, If it doesnt have I need to know

VirtuousDeath commented 4 years ago

Realised that bignum doesnt have support for decimal numbers