megabytes

Format your byte sizes as megabytes/kilobytes. For when ActiveSupport is too much. Use as a module that you include, or as a standalone module. The module is compatible with Opal as well.

Megabytes.megabytes(898218921)) #=> "856.61MB"

Contributing to megabytes

Copyright © 2015 WeTransfer. See LICENSE.txt for further details.