Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take into account precision option #2

Closed

Conversation

kosmasgiannis
Copy link

Hi there,

it seems that the precision option is not taken into account. I tried different values but the result was the same.
This pull request fixes the problem. Sprintf module is used for that purpose.

I hope you release it.

Thanks,
Giannis Kosmas

@adriano-di-giovanni
Copy link
Owner

Thanks, @kosmasgiannis

I fixed the issue without adding a new dependency.

Thanks again,
Adriano

@kosmasgiannis
Copy link
Author

@adriano-di-giovanni You are right, but I am afraid that this way it is not supported to round it to 0 decimal places. For example :

{ file: '/', prefixMultiplier: 'MB', precision: 0 }
[ { filesystem: '/dev/disk0s2',
    size: 499248.103424,
    used: 490356.23219199997,
    available: 8629.727232,
    capacity: 0.99,
    mount: '/' } ]

@adriano-di-giovanni
Copy link
Owner

Maybe I fixed this, too.

@kosmasgiannis
Copy link
Author

Confirmed fixed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants