Comparing version 0.1.0 to 0.2.0
# Changes | ||
## v0.2.0 | ||
- Add 'blocked' parameter to 'ready' event | ||
- Switch license to MIT | ||
## v0.1.0 | ||
Initial release |
@@ -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 @@ |
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6664
5
0
88
104
0