MikeMcl / bignumber.js

A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
http://mikemcl.github.io/bignumber.js
MIT License
6.63k stars 743 forks source link

toFormat method does not exist #331

Closed sif-baldr closed 2 years ago

sif-baldr commented 2 years ago

I tried the basic example among others:

y = new BigNumber('1234567.898765')
y.toFormat(2) 

I get the following error each time even though the value is a BigNumber:

Uncaught (in promise) TypeError: y.toFormat is not a function

MikeMcl commented 2 years ago

Perhaps you're using an earlier version of this library.

You have not provided enough information for me to assist further. Closing.