javascript-biginteger icon indicating copy to clipboard operation
javascript-biginteger copied to clipboard

Formatting

Open mickeyvip opened this issue 12 years ago • 1 comments

It would be great if BigInteger had formatting function. For example, using D3's formatting:

var myBigInt = BigInteger("1234567890");
console.log(myBigInt.format(",.02f"));   // "1,234,567,890.00"
console.log(myBigInt.toString(",.02f")); // "1,234,567,890.00"

Thank you

mickeyvip avatar May 08 '13 10:05 mickeyvip

That's a really good idea. I'll add that to my to-do list. Thanks for the idea!

Sorry it took me so long to respond to this, I'm a little behind on my emails.

Matthew

On Wed, May 8, 2013 at 6:22 AM, Mickey [email protected] wrote:

It would be great if BigInteger had formatting function. For example, using D3's formatting:

var myBigInt = BigInteger("1234567890");console.log(myBigInt.format(",.02f")); // "1,234,567,890.00"console.log(myBigInt.toString(",.02f")); // "1,234,567,890.00"

Thank you

— Reply to this email directly or view it on GitHubhttps://github.com/silentmatt/javascript-biginteger/issues/14 .

silentmatt avatar May 11 '13 05:05 silentmatt