Open onechiporenko opened 7 years ago
Hi @onechiporenko,
Thanks for the note. I think this is a good idea, but could use some refinement. How about an extra parameter that only takes the target format?
I say this because it seems like most of the time you are dealing with nicely displaying byte counts, you likely have an integer of bytes and probably not something in an already formatted string.
What do you think?
Well, I have case when input units are not always bytes. How about use Bytes as default units and allow user to specify custom one if needed?
Hi, @kellysutton. Thanks for your good addon! Would you be interested in a PR with helper that takes value, its current units and convert it to the another units? Example:
If it is interesting to you let me know - I'll start work on PR.
number-to-fixed-size
- please select appropriate one. Arguments order may be discussed too.