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

exponent option won't take effect when filesize is 0 #85

Closed
croogie opened this issue Feb 24, 2017 · 1 comment
Closed

exponent option won't take effect when filesize is 0 #85

croogie opened this issue Feb 24, 2017 · 1 comment
Assignees
Labels

Comments

@croogie
Copy link

croogie commented Feb 24, 2017

Let's consider scenario:

> filesize(100000000, { exponent: 2 })
'95.37 MB'
> filesize(0, { exponent: 2 })
'0 B'

In second call you can see that even if exponent option has been passed a result is returned in bytes.

@croogie croogie changed the title exponent setting property won't take effect when filesize is 0 exponent option won't take effect when filesize is 0 Feb 24, 2017
@avoidwork avoidwork self-assigned this Feb 24, 2017
@avoidwork avoidwork added the bug label Feb 24, 2017
@avoidwork
Copy link
Owner

0 is currently a short circuit; fixing this is trivial 👍

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

No branches or pull requests

2 participants