Open pdme opened 6 years ago
It looks like there's a special case that truncates for 0 decimals as opposed to rounding: https://github.com/HubSpot/humanize/blob/master/src/humanize.js#L130
If they took this case out and passed -44604 to the case for 1+ decimals, .toFixed(0)
would come out to "-45k".
Since the case exists, I'm assuming this is intentional but inconsistent.
Humanize.compactInteger(-44604);
Current result: "-44k"
Expected result: "-45k"
No?