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

Support negative numbers #12

Closed
sindresorhus opened this issue Feb 2, 2013 · 2 comments
Closed

Support negative numbers #12

sindresorhus opened this issue Feb 2, 2013 · 2 comments

Comments

@sindresorhus
Copy link

require('filesize')(-4) returns an empty string. Should return -4.00B.

@avoidwork
Copy link
Owner

What's the use case where this is valid? I'm unaware of any file system allowing for smaller than 0B files.

@sindresorhus
Copy link
Author

If you want to show the size difference of something.

Example: https://github.com/sindresorhus/grunt-sizediff

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

No branches or pull requests

2 participants