🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

express-timeout-handler

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-timeout-handler - npm Package Compare versions

Comparing version

to
2.2.2

.wakatime-project

15

index.js

@@ -55,7 +55,7 @@ const DEFAULT_DISABLE_LIST = [

}
var disableList = opts.disable || DEFAULT_DISABLE_LIST;
const disableList = opts.disable || DEFAULT_DISABLE_LIST;
return function(req, res, next) {
var start = Date.now();
var timeoutSocket = null;
const start = Date.now();
let timeoutSocket = null;

@@ -75,3 +75,3 @@ opts.timeout && req.connection.setTimeout(opts.timeout);

disableList.forEach( method => {
res[method] = accessAttempt.bind(null, method);
res[method] = accessAttempt.bind(res, method);
});

@@ -87,6 +87,6 @@ }

if (opts.onDelayedResponse) {
var requestTime = Date.now() - start;
var method = `res.${arguments[0]}`;
const requestTime = Date.now() - start;
const method = `res.${arguments[0]}`;
delete arguments[0];
var args = Object.keys(arguments).reduce((memo, key, index) => {
const args = Object.keys(arguments).reduce((memo, key, index) => {
memo[index] = arguments[key];

@@ -98,2 +98,3 @@ return memo;

}
return this;
}

@@ -100,0 +101,0 @@

{
"name": "express-timeout-handler",
"version": "2.2.0",
"version": "2.2.2",
"description": "Express timeout middleware that ensures a response is returned to the client on a timeout event.",

@@ -23,11 +23,14 @@ "main": "index.js",

"chai": "3.5.0",
"coveralls": "2.11.11",
"coveralls": "3.0.9",
"express": "4.17.1",
"istanbul": "0.4.5",
"jscs": "3.0.7",
"mocha": "2.5.3",
"mocha-eslint": "2.1.1",
"mocha": "6.1.4",
"mocha-eslint": "4.1.0",
"mocha-jscs": "5.0.1",
"request": "2.88.0"
},
"engines": {
"node": ">=6.0.0"
}
}

Sorry, the diff of this file is not supported yet