0.0.0 • Published 11 years ago

to-bytes v0.0.0

Weekly downloads
93
License
-
Repository
github
Last release
11 years ago

to-bytes

Parse numbers suffixed with /^(\d+)\s*(?:(k|m|g)b?)$/i into a number of bytes.

Synopsis

var toBytes = require('to-bytes')
	parseSize('100') == 100
	parseSize('10m') == parseSize('10MB') == 10 * 1024 * 1024

Install

npm install to-bytes

License

MIT

0.0.0

11 years ago