New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cooldown

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cooldown - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

LICENSE

4

CHANGES.md
# Changes
## v0.2.0
- Add 'blocked' parameter to 'ready' event
- Switch license to MIT
## v0.1.0
Initial release

6

index.js

@@ -38,2 +38,3 @@ // Copyright 2014, Patrick Mooney. All rights reserved.

this._ready = false;
this._blocked = false;
this._lastRun = process.hrtime();

@@ -44,2 +45,3 @@ this._checkTimer(true);

}
this._blocked = true;
return false;

@@ -59,3 +61,3 @@ };

if (!noEmit) {
this.emit('ready');
this.emit('ready', false);
}

@@ -92,3 +94,3 @@ }

this._timer = null;
this.emit('ready');
this.emit('ready', this._blocked);
} else {

@@ -95,0 +97,0 @@ // It's not _quite_ time yet

{
"name": "cooldown",
"version": "0.1.0",
"version": "0.2.0",
"description": "Cooldown timer for rate-limiting events",

@@ -11,3 +11,11 @@ "main": "index.js",

"author": "Patrick Mooney <patrick.f.mooney@gmail.com>",
"license": "BSD",
"license": "MIT",
"licenses": [{
"type": "MIT",
"url": "https://github.com/pfmooney/node-cooldown/raw/master/LICENSE"
}],
"repository": {
"type": "git",
"url": "git://github.com/pfmooney/node-cooldown.git"
},
"dependencies": {

@@ -14,0 +22,0 @@ "assert-plus": "^0.1.5"

# Cooldown
Timer mechanism to limit place upper bound on rate of events.
Timer mechanism to place upper bound on rate of events.

@@ -90,2 +90,4 @@ ## Installation

- blocked: True if attempts were made to fire timer during cooldown period
#### Event: 'cooldown'

@@ -97,3 +99,3 @@

BSD
MIT

@@ -100,0 +102,0 @@

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