Comparing version 1.0.1 to 1.0.2
@@ -13,5 +13,5 @@ var divisors = { | ||
if (typeof format !== 'string') throw new TypeError('Expected \'format\' to be a string') | ||
var divisor = divisors[format.replace('/', 'p')] | ||
var divisor = divisors[ format.replace('/', 'p') ] | ||
if (!divisor) throw new Error('\'format\' is an invalid string') | ||
return bytes/seconds/divisor | ||
return bytes / seconds / divisor | ||
} |
{ | ||
"name": "bitrate", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "license": "VOL", |
@@ -15,5 +15,5 @@ bitrate | ||
var rate1 = bitrate(6076940, 149) // => 326.3 | ||
var rate2 = bitrate(6076940, 149, 'bps') // => 326279 | ||
var rate3 = bitrate(6076940, 149, 'Bps') // => 40785 | ||
var kilobitsPerSecond = bitrate(6076940, 149) // => 326.3 | ||
var bitsPerSecond = bitrate(6076940, 149, 'bps') // => 326279 | ||
var BytesPerSecond = bitrate(6076940, 149, 'Bps') // => 40785 | ||
``` | ||
@@ -27,3 +27,3 @@ | ||
# `var rate = bitrate(bytes, seconds, [format])` | ||
## `var rate = bitrate(bytes, seconds, [format])` | ||
@@ -30,0 +30,0 @@ - `bytes` is the number in bytes |
4054