async-ratelimiter
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,11 @@ | ||
<a name="1.0.1"></a> | ||
## 1.0.1 (2018-06-17) | ||
* Add namespace doc ([ddfcd03](https://github.com/microlinkhq/async-ratelimiter/commit/ddfcd03)) | ||
* Avoid mutate state ([536d6a2](https://github.com/microlinkhq/async-ratelimiter/commit/536d6a2)) | ||
* Fix get id from param ([c4c18fe](https://github.com/microlinkhq/async-ratelimiter/commit/c4c18fe)) | ||
* Update precondition ([79d500d](https://github.com/microlinkhq/async-ratelimiter/commit/79d500d)) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +12,0 @@ # 1.0.0 (2018-06-17) |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://documentup.com/microlinkhq/async-ratelimiter", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -81,2 +81,9 @@ # async-ratelimiter | ||
##### namespace | ||
Type: `string`<br> | ||
Default: `'limit'` | ||
The prefix used for compound the key. | ||
##### id | ||
@@ -83,0 +90,0 @@ |
@@ -21,3 +21,3 @@ 'use strict' | ||
const { db, duration, max } = this | ||
const key = `${this.namespace}:${this.id}` | ||
const key = `${this.namespace}:${id}` | ||
const now = microtime.now() | ||
@@ -24,0 +24,0 @@ const start = now - duration * 1000 |
8090
117