A simple and fast library to convert human readable sizes into their byte or bit count and vice-versa.
This library is AMD compatible, available as a node module, as a bower component, and as a HTML script tag.
npm install bytes
or
bower install bytes
or simply include it in your HTML
<script src="bytes.js" type="text/javascript"></script>
Please see the annotated source code documentation under /docs/bytes.html
.
Please see the unit tests described in /test/test.js
.