tally-ttl 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ Each tally has it's own TTL (rounded to 1 second increments).
|
|
|
6
6
|
|
|
7
7
|
Contains both CommonJS and ESM modules for counting items. Typescript types included with ESM version.
|
|
8
8
|
|
|
9
|
+
Has a built-in cleanup function to delete expired tallies.
|
|
10
|
+
|
|
9
11
|
**Installation**
|
|
10
12
|
|
|
11
13
|
```
|
|
@@ -23,7 +25,7 @@ const TallyTTL = require("tally-ttl");
|
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
```javascript
|
|
26
|
-
// Example: 5
|
|
28
|
+
// Example: Set a default TTL for each tally to 5 minutes (300 seconds). After this time the tally will expire and will not be counted.
|
|
27
29
|
const userActionTally = new TallyTTL({ defaultTtl: 60 });
|
|
28
30
|
|
|
29
31
|
// in this case, we want to track how many times a user has failed to login
|