Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

faster-query

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faster-query - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

dist/index.js

@@ -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 @@ /**

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