byt
Version:
Convert arbitrary unit strings into byte counts
28 lines (20 loc) • 464 B
Markdown
byte
====
Convert arbitrary unit strings into byte counts.
[](https://travis-ci.org/dstokes/byt)
[](https://nodei.co/npm/byt/)
example
=======
``` js
var b = require('byt');
b(1024); // => 1024
b('1k'); // => 1024
b('2.5m'); // => 2621440
b('1GB'); // => 1073741824
```
install
=======
With [npm](http://npmjs.org) do:
```
npm install byt
```