faster-query
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -256,4 +256,4 @@ "use strict"; | ||
FasterQuery.timersToDelete = new Map(); | ||
FasterQuery.isLogging = true; | ||
FasterQuery.isLogging = false; | ||
process.on('exit', FasterQuery.clearTimers); | ||
exports.default = FasterQuery; |
{ | ||
"name": "faster-query", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Faster query for any slow function. Get any data from cache and update in cache AFTER data is received", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -86,4 +86,14 @@ # FasterQuery (ts) | ||
const result = await cachedDataBySlug('slug/to/get/data'); | ||
``` | ||
### Logging | ||
```typescript | ||
import FasterQuery from 'faster-query'; | ||
FasterQuery.isLogging = true | ||
``` | ||
Logging only in development | ||
## Clearing Intervals and Timers | ||
On ```process.on('exit', ...);``` script clearing all Intervals and Timers |
@@ -27,3 +27,3 @@ import * as fs from 'fs'; | ||
static timersToDelete = new Map<string, NodeJS.Timeout>(); | ||
static isLogging = true; | ||
static isLogging = false; | ||
@@ -30,0 +30,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30891
99