Socket
Socket
Sign inDemoInstall

speed-limiter

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speed-limiter - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

lib/throttle-group.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc