New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reliable-get

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reliable-get - npm Package Compare versions

Comparing version 0.1.25 to 0.1.26

12

index.js

@@ -68,6 +68,6 @@ 'use strict';

res.content = content;
res.timing = Date.now() - start;
cb(null, res);
var timing = Date.now() - start;
self.emit('log', 'debug', 'OK ' + options.url, {tracer:options.tracer, responseTime: timing, type:options.type});
self.emit('stat', 'timing', options.statsdKey + '.responseTime', timing);
self.emit('log', 'debug', 'OK ' + options.url, {tracer:options.tracer, responseTime: res.timing, type:options.type});
self.emit('stat', 'timing', options.statsdKey + '.responseTime', res.timing);
});

@@ -82,3 +82,3 @@

res.headers['cache-control'] = 'no-store';
next(null, {statusCode: res.statusCode, content: res.content, headers: res.headers});
next(null, {statusCode: res.statusCode, content: res.content, headers: res.headers, timing: res.timing});
});

@@ -96,3 +96,3 @@ }

self.emit('stat', 'increment', options.statsdKey + '.cacheHit');
next(null, {statusCode: 200, content: cacheData.content, headers: cacheData.headers});
next(null, {statusCode: 200, content: cacheData.content, headers: cacheData.headers, timing: timing});
return;

@@ -132,3 +132,3 @@ }

cache.set(options.cacheKey, {content: res.content, headers: res.headers, options: options}, options.cacheTTL, function() {
next(null, {statusCode: 200, content: res.content, headers:res.headers});
next(null, {statusCode: 200, content: res.content, headers:res.headers, timing: res.timing});
self.emit('log','debug', 'CACHE SET for key: ' + options.cacheKey + ' @ TTL: ' + options.cacheTTL,{tracer:options.tracer,type:options.type});

@@ -135,0 +135,0 @@ });

{
"name": "reliable-get",
"version": "0.1.25",
"version": "0.1.26",
"description": "A circuit breaker and cached wrapper for GET requests (enables reliable external service interaction).",

@@ -5,0 +5,0 @@ "main": "index.js",

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