If value is zero, numeral.js prints space instead of zero

59 views Asked by At

When the value is zero, numeral.js prints a space instead of 0.00. I need this case to print 0.00.

This prints space:

let x = numeral(0).format('0.00');
console.log(x);

if the value is not zero, this works fine. Any ideas how to fix this?

0

There are 0 answers