Skip to content

Number rounds up erroneouslyΒ #33

@djasnowski

Description

@djasnowski

https://codesandbox.io/s/magical-water-f7f84n?file=/src/index.js:0-164

import millify from "millify";

const OneBelow1Mill = 999999;
const OneBelow100G = 99999;

console.log(millify(OneBelow1Mill));
console.log(millify(OneBelow100G));

Output:

1M
100K

It should be:

999K
99K

Should it not? Why is it rounding up?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions