speed-limiter
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -37,3 +37,3 @@ const { TokenBucket } = require('limiter') | ||
// Note: rate = 0, means we should stop processing chunks | ||
if (typeof rate !== 'number' || rate < 0) throw new Error('Rate must be a number bigger than zero') | ||
if (!Number.isInteger(rate) || rate < 0) throw new Error('Rate must be an integer bigger than zero') | ||
rate = parseInt(rate) | ||
@@ -54,3 +54,3 @@ | ||
setChunksize (chunksize) { | ||
if (typeof chunksize !== 'number' || chunksize <= 0) throw new Error('Chunk size must be a number bigger than zero') | ||
if (!Number.isInteger(chunksize) || chunksize <= 0) throw new Error('Chunk size must be an integer bigger than zero') | ||
const rate = this.getRate() | ||
@@ -57,0 +57,0 @@ chunksize = parseInt(chunksize) |
{ | ||
"name": "speed-limiter", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Throttle the speed of streams", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12383